public interface DistributedCounterManager
Modifier and Type | Method and Description |
---|---|
long |
addAndGetCounter(java.lang.String key,
long value)
This method used to add and return the distributed counter value.
|
long |
asyncGetAndAddCounter(java.lang.String key,
long value)
This method used to update distributed counter asynchronously.
|
long |
asyncGetAndAlterCounter(java.lang.String key,
long value)
This method used to alter the DistributedCounter.
|
long |
getCounter(java.lang.String key)
Returns the Distributed Counter for specific key.
|
long |
getTimestamp(java.lang.String key)
This method returns shared TimeStamp of distributed Key.
|
java.lang.String |
getType() |
boolean |
isEnable() |
void |
removeCounter(java.lang.String key)
This method used to remove specified key.
|
void |
removeTimestamp(java.lang.String key)
This method removes the timestamp relevant to key.
|
void |
setCounter(java.lang.String key,
long value)
Sets the Distributed counter with value.
|
void |
setExpiry(java.lang.String key,
long expiryTimeStamp) |
void |
setTimestamp(java.lang.String key,
long timeStamp)
This method set the Timestamp to distributed map.
|
long getCounter(java.lang.String key)
key
- key to check in distributed map.void setCounter(java.lang.String key, long value)
key
- key to add in distributed map.value
- value of distributed counter.long addAndGetCounter(java.lang.String key, long value)
key
- key to add in distributed map.value
- value to add to distributed counter.void removeCounter(java.lang.String key)
key
- key to check in distributed map.long asyncGetAndAddCounter(java.lang.String key, long value)
key
- key to check in distributed map.value
- value to add to distributed counter.long asyncGetAndAlterCounter(java.lang.String key, long value)
key
- key to check in distributed map.value
- value of distributed counter.long getTimestamp(java.lang.String key)
key
- key to check in distributed map.void setTimestamp(java.lang.String key, long timeStamp)
key
- key to add in distributed map.timeStamp
- timestamp to add.void removeTimestamp(java.lang.String key)
key
- key to check in distributed map.boolean isEnable()
java.lang.String getType()
void setExpiry(java.lang.String key, long expiryTimeStamp)
Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.