Package org.jgroups.blocks.atomic
Interface BaseCounter
- All Known Subinterfaces:
AsyncCounter,Counter,SyncCounter
- All Known Implementing Classes:
COUNTER.CounterImpl,COUNTER.SyncCounterImpl
public interface BaseCounter
Base interface for all counters
- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionasync()Returns anAsyncCounterwrapper for this instance.getName()sync()Returns aSyncCounterwrapper for this instance.
-
Method Details
-
getName
String getName()- Returns:
- The counter's name.
-
sync
SyncCounter sync()Returns aSyncCounterwrapper for this instance. If this counter is already synchronous, then this counter instance is returned (no-op)- Returns:
- The
SyncCounterinstance;
-
async
AsyncCounter async()Returns anAsyncCounterwrapper for this instance. If this counter is already asynchronous, then this counter instance is returned (no-op)- Returns:
- The
AsyncCounterinstance.
-