Class UnboundedStrongCounter
- java.lang.Object
-
- org.infinispan.counter.impl.strong.AbstractStrongCounter
-
- org.infinispan.counter.impl.strong.UnboundedStrongCounter
-
- All Implemented Interfaces:
org.infinispan.counter.api.StrongCounter,CounterEventGenerator
public class UnboundedStrongCounter extends AbstractStrongCounter
An unbounded strong consistent counter.- Since:
- 9.0
- Author:
- Pedro Ruivo
- See Also:
AbstractStrongCounter
-
-
Constructor Summary
Constructors Constructor Description UnboundedStrongCounter(String counterName, org.infinispan.AdvancedCache<StrongCounterKey,CounterValue> cache, org.infinispan.counter.api.CounterConfiguration configuration, CounterManagerNotificationManager notificationManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longhandleAddResult(CounterValue counterValue)Extracts and validates the value after a read.protected LonghandleCASResult(Object state)StringtoString()-
Methods inherited from class org.infinispan.counter.impl.strong.AbstractStrongCounter
addAndGet, addListener, compareAndSwap, destroyAndRemove, generate, getConfiguration, getName, getValue, init, remove, removeStrongCounter, reset, sync
-
-
-
-
Constructor Detail
-
UnboundedStrongCounter
public UnboundedStrongCounter(String counterName, org.infinispan.AdvancedCache<StrongCounterKey,CounterValue> cache, org.infinispan.counter.api.CounterConfiguration configuration, CounterManagerNotificationManager notificationManager)
-
-
Method Detail
-
handleCASResult
protected Long handleCASResult(Object state)
- Specified by:
handleCASResultin classAbstractStrongCounter
-
handleAddResult
protected long handleAddResult(CounterValue counterValue)
Description copied from class:AbstractStrongCounterExtracts and validates the value after a read.Any exception should be thrown using
CompletionException.- Specified by:
handleAddResultin classAbstractStrongCounter- Parameters:
counterValue- The newCounterValue.- Returns:
- The new value stored in
CounterValue.
-
-