use of com.hazelcast.core.AsyncAtomicLong in project wso2-synapse by wso2.
the class HazelcastDistributedCounterManager method asyncGetAndAddCounter.
@Override
public long asyncGetAndAddCounter(String key, long value) {
HazelcastInstance hazelcastInstance = getHazelcastInstance();
AsyncAtomicLong asyncAtomicLong = (AsyncAtomicLong) hazelcastInstance.getAtomicLong(key);
long currentGlobalCounter = asyncAtomicLong.get();
asyncAtomicLong.asyncAddAndGet(value);
return currentGlobalCounter;
}
Aggregations