public interface ReadOnlyService extends Lifecycle<ReadOnlyServiceOptions>
| Modifier and Type | Method and Description |
|---|---|
void |
addRequest(byte[] reqCtx,
ReadIndexClosure closure)
Adds a ReadIndex request.
|
void |
addRequest(ReadOnlyOption readOnlyOptions,
byte[] reqCtx,
ReadIndexClosure closure)
Adds a ReadIndex request.
|
void |
join()
Waits for service shutdown.
|
void |
setError(RaftException error)
Called when the node is turned into error state.
|
void addRequest(byte[] reqCtx,
ReadIndexClosure closure)
reqCtx - request context of readIndexclosure - callbackvoid addRequest(ReadOnlyOption readOnlyOptions, byte[] reqCtx, ReadIndexClosure closure)
readOnlyOptions - how the read only request is processedreqCtx - request context of readIndexclosure - callbackvoid join() throws InterruptedException
InterruptedException - if the current thread is interrupted
while waitingvoid setError(RaftException error)
error - error with raft infoCopyright © 2024. All rights reserved.