Package org.jgroups.blocks.atomic
Interface Counter
- All Superinterfaces:
BaseCounter,SyncCounter
- All Known Implementing Classes:
COUNTER.SyncCounterImpl
Deprecated.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault AsyncCounterasync()Deprecated.Returns anAsyncCounterwrapper for this instance.default longcompareAndSwap(long expect, long update) Deprecated.Atomically updates the counter using a compare-and-swap operation.Methods inherited from interface org.jgroups.blocks.atomic.BaseCounter
getNameMethods inherited from interface org.jgroups.blocks.atomic.SyncCounter
addAndGet, compareAndSet, decrementAndGet, get, incrementAndGet, set, sync, update
-
Method Details
-
compareAndSwap
default long compareAndSwap(long expect, long update) Deprecated.Description copied from interface:SyncCounterAtomically updates the counter using a compare-and-swap operation.- Specified by:
compareAndSwapin interfaceSyncCounter- Parameters:
expect- The expected value of the counterupdate- The new value of the counter- Returns:
- The previous value of the counter
-
async
Deprecated.Description copied from interface:BaseCounterReturns anAsyncCounterwrapper for this instance. If this counter is already asynchronous, then this counter instance is returned (no-op)- Specified by:
asyncin interfaceBaseCounter- Returns:
- The
AsyncCounterinstance.
-
SyncCounterinstead.