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,InternalCounterAdmin
An unbounded strong consistent counter.
- Since:
- 9.0
- Author:
- Pedro Ruivo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnboundedStrongCounter(String counterName, org.infinispan.AdvancedCache<StrongCounterKey, CounterValue> cache, org.infinispan.counter.api.CounterConfiguration configuration, CounterManagerNotificationManager notificationManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected longhandleAddResult(CounterValue counterValue) Extracts and validates the value after a read.protected LonghandleCASResult(Object state) toString()Methods inherited from class org.infinispan.counter.impl.strong.AbstractStrongCounter
addAndGet, addListener, asStrongCounter, compareAndSwap, destroy, generate, getConfiguration, getName, getValue, init, isWeakCounter, remove, removeStrongCounter, reset, sync, valueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.counter.impl.manager.InternalCounterAdmin
asWeakCounterMethods inherited from interface org.infinispan.counter.api.StrongCounter
compareAndSet, decrementAndGet, incrementAndGet
-
Constructor Details
-
UnboundedStrongCounter
public UnboundedStrongCounter(String counterName, org.infinispan.AdvancedCache<StrongCounterKey, CounterValue> cache, org.infinispan.counter.api.CounterConfiguration configuration, CounterManagerNotificationManager notificationManager)
-
-
Method Details
-
handleCASResult
- Specified by:
handleCASResultin classAbstractStrongCounter
-
handleAddResult
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.
-
toString
-