public class ConcurrentAccessController extends Object implements Serializable
Constructor and Description |
---|
ConcurrentAccessController(int limit) |
Modifier and Type | Method and Description |
---|---|
int |
getAndDecrement()
Decrements by one the current value and Returns the previous value
|
int |
getLimit()
Gets the Max number of access - access limit
|
int |
incrementAndGet()
Increments by one the current value and Returns the the updated value
|
void |
set(int newValue)
Resets the counter and the limit
|
void |
updateCounter(boolean isIncrement) |
public int getAndDecrement()
public int incrementAndGet()
public int getLimit()
public void set(int newValue)
newValue
- The new Valuepublic void updateCounter(boolean isIncrement)
Copyright © 2005–2018 Apache Software Foundation. All rights reserved.