Package org.jgroups.blocks.atomic
Interface Counter
-
- All Superinterfaces:
BaseCounter,SyncCounter
@Deprecated public interface Counter extends SyncCounter
Deprecated.Since 5.2 and to be removed in a future version. UseSyncCounterinstead.- Since:
- 3.0.0
- Author:
- Bela Ban
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default 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
getName
-
Methods inherited from interface org.jgroups.blocks.atomic.SyncCounter
addAndGet, compareAndSet, decrementAndGet, get, incrementAndGet, set, sync, update
-
-
-
-
Method Detail
-
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
default AsyncCounter 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.
-
-