Package org.jgroups.blocks.atomic
Interface BaseCounter
-
- All Known Subinterfaces:
AsyncCounter
,Counter
,SyncCounter
- All Known Implementing Classes:
COUNTER.CounterImpl
public interface BaseCounter
Base interface for all counters- Since:
- 5.2
- Author:
- Bela Ban
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AsyncCounter
async()
Returns anAsyncCounter
wrapper for this instance.java.lang.String
getName()
SyncCounter
sync()
Returns aSyncCounter
wrapper for this instance.
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- The counter's name.
-
sync
SyncCounter sync()
Returns aSyncCounter
wrapper for this instance. If this counter is already synchronous, then this counter instance is returned (no-op)- Returns:
- The
SyncCounter
instance;
-
async
AsyncCounter async()
Returns anAsyncCounter
wrapper for this instance. If this counter is already asynchronous, then this counter instance is returned (no-op)- Returns:
- The
AsyncCounter
instance.
-
-