public interface ServiceContext
The context is reflective of the current position and state of the Raft state machine. In particular,
it exposes the current approximate time and all open
RaftSessions.
| Modifier and Type | Method and Description |
|---|---|
long |
currentIndex()
Returns the current state machine index.
|
OperationType |
currentOperation()
Returns the current operation type.
|
io.atomix.time.LogicalClock |
logicalClock()
Returns the state machine's logical clock.
|
ServiceId |
serviceId()
Returns the state machine identifier.
|
String |
serviceName()
Returns the state machine name.
|
ServiceType |
serviceType()
Returns the state machine type.
|
RaftSessions |
sessions()
Returns the state machine sessions.
|
io.atomix.time.WallClock |
wallClock()
Returns the state machine's wall clock.
|
ServiceId serviceId()
String serviceName()
ServiceType serviceType()
long currentIndex()
The state index is indicative of the index of the current operation being applied to the server state machine. If a query is being applied, the index of the last command applied will be used.
OperationType currentOperation()
io.atomix.time.LogicalClock logicalClock()
io.atomix.time.WallClock wallClock()
RaftSessions sessions()
Copyright © 2013–2017. All rights reserved.