Package org.jgroups.blocks.atomic
Interface Counter
-
- All Superinterfaces:
SyncCounter
- All Known Implementing Classes:
COUNTER.SyncCounterImpl
@Deprecated public interface Counter extends SyncCounter
Deprecated.Since 5.2 and to be removed in a future version. UseSyncCounterinstead.- Since:
- 3.0.0
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default AsyncCounterasync()Deprecated.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.SyncCounter
addAndGet, compareAndSet, decrementAndGet, get, getName, incrementAndGet, set, 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.- Specified by:
asyncin interfaceSyncCounter- Returns:
- an asynchronous wrapper around this instance.
-
-