public abstract class AbstractPrimitiveService<C> extends Object implements PrimitiveService
| Modifier and Type | Method and Description |
|---|---|
byte[] |
apply(Commit<byte[]> commit)
Applies a commit to the state machine.
|
void |
close(SessionId sessionId)
Closes the session with the given identifier.
|
void |
expire(SessionId sessionId)
Expires the session with the given identifier.
|
void |
init(ServiceContext context)
Initializes the state machine.
|
void |
register(Session session)
Registers a primitive session.
|
Serializer |
serializer()
Returns the primitive service serializer.
|
void |
tick(WallClockTimestamp timestamp)
Increments the Raft service time to the given timestamp.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbackup, close, restorepublic Serializer serializer()
PrimitiveServiceserializer in interface PrimitiveServicepublic final void init(ServiceContext context)
PrimitiveServiceinit in interface PrimitiveServicecontext - The state machine context.public final void tick(WallClockTimestamp timestamp)
PrimitiveServicetick in interface PrimitiveServicetimestamp - the service timestamppublic final byte[] apply(Commit<byte[]> commit)
PrimitiveServiceapply in interface PrimitiveServicecommit - the commit to applypublic final void register(Session session)
PrimitiveServiceregister in interface PrimitiveServicesession - the session to registerpublic final void expire(SessionId sessionId)
PrimitiveServiceexpire in interface PrimitiveServicesessionId - the session identifierpublic final void close(SessionId sessionId)
PrimitiveServiceclose in interface PrimitiveServicesessionId - the session identifierCopyright © 2013–2018. All rights reserved.