Package io.atomix.primitive.service
Interface ServiceContext
public interface ServiceContext
-
Method Summary
Modifier and Type Method Description longcurrentIndex()Returns the current state machine index.OperationTypecurrentOperation()Returns the current operation type.SessioncurrentSession()Returns the current session.io.atomix.cluster.MemberIdlocalMemberId()Returns the local member IDio.atomix.utils.time.LogicalClocklogicalClock()Returns the state machine's logical clock.<C extends ServiceConfig>
CserviceConfig()Returns the service configuration.PrimitiveIdserviceId()Returns the state machine identifier.StringserviceName()Returns the state machine name.PrimitiveTypeserviceType()Returns the state machine type.io.atomix.utils.time.WallClockwallClock()Returns the state machine's wall clock.
-
Method Details
-
serviceId
PrimitiveId serviceId()Returns the state machine identifier.- Returns:
- The unique state machine identifier.
-
serviceName
String serviceName()Returns the state machine name.- Returns:
- The state machine name.
-
serviceType
PrimitiveType serviceType()Returns the state machine type.- Returns:
- The state machine type.
-
localMemberId
io.atomix.cluster.MemberId localMemberId()Returns the local member ID- Returns:
- The local member ID
-
serviceConfig
Returns the service configuration.- Type Parameters:
C- the configuration type- Returns:
- the service configuration
-
currentIndex
long currentIndex()Returns the current state machine index.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.
- Returns:
- The current state machine index.
-
currentSession
Session currentSession()Returns the current session.- Returns:
- the current session
-
currentOperation
OperationType currentOperation()Returns the current operation type.- Returns:
- the current operation type
-
logicalClock
io.atomix.utils.time.LogicalClock logicalClock()Returns the state machine's logical clock.- Returns:
- The state machine's logical clock.
-
wallClock
io.atomix.utils.time.WallClock wallClock()Returns the state machine's wall clock.- Returns:
- The state machine's wall clock.
-