public interface PrimitiveService extends SessionListener
Commit,
ServiceContext,
ServiceExecutor| Modifier and Type | Method and Description |
|---|---|
byte[] |
apply(Commit<byte[]> commit)
Applies a commit to the state machine.
|
void |
backup(io.atomix.storage.buffer.BufferOutput<?> output)
Backs up the service state to the given buffer.
|
default void |
close()
Closes the state machine.
|
void |
init(ServiceContext context)
Initializes the state machine.
|
void |
restore(io.atomix.storage.buffer.BufferInput<?> input)
Restores the service state from the given buffer.
|
void |
tick(io.atomix.utils.time.WallClockTimestamp timestamp)
Increments the Raft service time to the given timestamp.
|
onClose, onExpire, onOpenvoid init(ServiceContext context)
context - The state machine context.NullPointerException - if context is nullvoid tick(io.atomix.utils.time.WallClockTimestamp timestamp)
timestamp - the service timestampvoid backup(io.atomix.storage.buffer.BufferOutput<?> output)
output - the buffer to which to back up the service statevoid restore(io.atomix.storage.buffer.BufferInput<?> input)
input - the buffer from which to restore the service statebyte[] apply(Commit<byte[]> commit)
commit - the commit to applydefault void close()
Copyright © 2013–2018. All rights reserved.