public class HazelcastDistributedCounterManager extends java.lang.Object implements DistributedCounterManager
| Constructor and Description |
|---|
HazelcastDistributedCounterManager() |
| 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.
|
public long getCounter(java.lang.String key)
DistributedCounterManagergetCounter in interface DistributedCounterManagerkey - key to check in distributed map.public void setCounter(java.lang.String key,
long value)
DistributedCounterManagersetCounter in interface DistributedCounterManagerkey - key to add in distributed map.value - value of distributed counter.public long addAndGetCounter(java.lang.String key,
long value)
DistributedCounterManageraddAndGetCounter in interface DistributedCounterManagerkey - key to add in distributed map.value - value to add to distributed counter.public void removeCounter(java.lang.String key)
DistributedCounterManagerremoveCounter in interface DistributedCounterManagerkey - key to check in distributed map.public long asyncGetAndAddCounter(java.lang.String key,
long value)
DistributedCounterManagerasyncGetAndAddCounter in interface DistributedCounterManagerkey - key to check in distributed map.value - value to add to distributed counter.public long asyncGetAndAlterCounter(java.lang.String key,
long value)
DistributedCounterManagerasyncGetAndAlterCounter in interface DistributedCounterManagerkey - key to check in distributed map.value - value of distributed counter.public long getTimestamp(java.lang.String key)
DistributedCounterManagergetTimestamp in interface DistributedCounterManagerkey - key to check in distributed map.public void setTimestamp(java.lang.String key,
long timeStamp)
DistributedCounterManagersetTimestamp in interface DistributedCounterManagerkey - key to add in distributed map.timeStamp - timestamp to add.public void removeTimestamp(java.lang.String key)
DistributedCounterManagerremoveTimestamp in interface DistributedCounterManagerkey - key to check in distributed map.public boolean isEnable()
isEnable in interface DistributedCounterManagerpublic java.lang.String getType()
getType in interface DistributedCounterManagerpublic void setExpiry(java.lang.String key,
long expiryTimeStamp)
setExpiry in interface DistributedCounterManagerCopyright © 2005-2021 Apache Software Foundation. All Rights Reserved.