- All Superinterfaces:
org.jgroups.blocks.atomic.BaseCounter
- All Known Subinterfaces:
RaftAsyncCounter,RaftSyncCounter
- All Known Implementing Classes:
AsyncCounterImpl
public interface RaftCounter
extends org.jgroups.blocks.atomic.BaseCounter
TODO! document this
-
Method Summary
Modifier and TypeMethodDescriptionasync()longgetLocal()Gets the current local value of the counter; this is purely local and the value may be stalesync()withOptions(Options opts) Returns an instance of a counter with the given optionsMethods inherited from interface org.jgroups.blocks.atomic.BaseCounter
getName
-
Method Details
-
getLocal
long getLocal()Gets the current local value of the counter; this is purely local and the value may be stale- Returns:
- The current local value of the counter
-
withOptions
Returns an instance of a counter with the given options- Parameters:
opts- The options- Returns:
- The counter of the given type
-
sync
RaftSyncCounter sync()- Specified by:
syncin interfaceorg.jgroups.blocks.atomic.BaseCounter
-
async
RaftAsyncCounter async()- Specified by:
asyncin interfaceorg.jgroups.blocks.atomic.BaseCounter
-