| 限定符和类型 | 方法和说明 |
|---|---|
Closure |
Iterator.done()
If done() is non-NULL, you must call done()->Run() after applying this
task no matter this operation succeeds or fails, otherwise the
corresponding resources would leak.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Node.addLearners(List<PeerId> learners,
Closure done)
Add some new learners to the raft group. done.run() will be invoked after this
operation finishes, describing the detailed result.
|
void |
Node.addPeer(PeerId peer,
Closure done)
Add a new peer to the raft group. done.run() would be invoked after this
operation finishes, describing the detailed result.
|
void |
Node.changePeers(Configuration newPeers,
Closure done)
Change the configuration of the raft group to |newPeers| , done.un()
would be invoked after this operation finishes, describing the detailed result.
|
void |
StateMachine.onSnapshotSave(SnapshotWriter writer,
Closure done)
User defined snapshot generate function, this method will block StateMachine#onApply(Iterator).
|
void |
Node.removeLearners(List<PeerId> learners,
Closure done)
Remove some learners from the raft group. done.run() will be invoked after this
operation finishes, describing the detailed result.
|
void |
Node.removePeer(PeerId peer,
Closure done)
Remove the peer from the raft group. done.run() would be invoked after
operation finishes, describing the detailed result.
|
void |
Node.resetLearners(List<PeerId> learners,
Closure done)
Reset learners in the raft group. done.run() will be invoked after this
operation finishes, describing the detailed result.
|
void |
Node.shutdown(Closure done)
Shutdown local replica node.
|
void |
Node.snapshot(Closure done)
Start a snapshot immediately if possible. done.run() would be invoked when
the snapshot finishes, describing the detailed result.
|
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
LoadSnapshotClosure
Load snapshot closure
|
interface |
SaveSnapshotClosure
Save snapshot closure
|
interface |
TaskClosure
Closure for task applying.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
CatchUpClosure
A catchup closure for peer to catch up.
|
class |
JoinableClosure |
class |
ReadIndexClosure
Read index closure
|
class |
SynchronizedClosure
A special Closure which provides synchronization primitives.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Closure |
JoinableClosure.getClosure() |
| 限定符和类型 | 方法和说明 |
|---|---|
LinkedList<Closure> |
ClosureQueueImpl.getQueue() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ClosureQueue.appendPendingClosure(Closure closure)
Append a new closure into queue.
|
void |
ClosureQueueImpl.appendPendingClosure(Closure closure) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
ClosureQueue.popClosureUntil(long endIndex,
List<Closure> closures)
Pop closure from queue until index(inclusion), returns the first
popped out index, returns -1 when out of range, returns index+1
when not found.
|
long |
ClosureQueueImpl.popClosureUntil(long endIndex,
List<Closure> closures) |
long |
ClosureQueue.popClosureUntil(long endIndex,
List<Closure> closures,
List<TaskClosure> taskClosures)
Pop closure from queue until index(inclusion), returns the first
popped out index, returns -1 when out of range, returns index+1
when not found.
|
long |
ClosureQueueImpl.popClosureUntil(long endIndex,
List<Closure> closures,
List<TaskClosure> taskClosures) |
| 构造器和说明 |
|---|
JoinableClosure(Closure closure) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
FSMCallerImpl.OnErrorClosure
Closure runs with an error.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Closure |
IteratorImpl.done() |
Closure |
IteratorWrapper.done() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
NodeImpl.addLearners(List<PeerId> learners,
Closure done) |
void |
NodeImpl.addPeer(PeerId peer,
Closure done) |
boolean |
BallotBox.appendPendingTask(Configuration conf,
Configuration oldConf,
Closure done)
Called by leader, otherwise the behavior is undefined
Store application context before replication.
|
void |
NodeImpl.changePeers(Configuration newPeers,
Closure done) |
void |
StateMachineAdapter.onSnapshotSave(SnapshotWriter writer,
Closure done) |
void |
NodeImpl.removeLearners(List<PeerId> learners,
Closure done) |
void |
NodeImpl.removePeer(PeerId peer,
Closure done) |
void |
NodeImpl.resetLearners(List<PeerId> learners,
Closure done) |
void |
NodeImpl.shutdown(Closure done) |
void |
NodeImpl.snapshot(Closure done) |
| 构造器和说明 |
|---|
IteratorImpl(StateMachine fsm,
LogManager logManager,
List<Closure> closures,
long firstClosureIndex,
long lastAppliedIndex,
long committedIndex,
AtomicLong applyingIndex) |
| 限定符和类型 | 方法和说明 |
|---|---|
Closure |
Task.getDone() |
Closure |
Task.join()
Waiting for the task to complete, to note that throughput may be reduced,
which is generally not recommended.
|
Closure |
Task.join(long timeoutMillis)
Waiting for the task to complete with a timeout millis, to note that throughput
may be reduced, which is generally not recommended.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static List<Closure> |
Task.joinAll(List<Task> tasks)
Waiting for all tasks to complete.
|
static List<Closure> |
Task.joinAll(List<Task> tasks,
long timeoutMillis)
Waiting for all tasks to complete with a timeout millis.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Task.setDone(Closure done) |
| 构造器和说明 |
|---|
Task(ByteBuffer data,
Closure done)
Creates a task with data/done.
|
Task(ByteBuffer data,
Closure done,
long expectedTerm)
Creates a task with data/done/expectedTerm.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Closure |
FSMCallerOptions.getAfterShutdown() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
FSMCallerOptions.setAfterShutdown(Closure afterShutdown) |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
RpcResponseClosure<T extends com.google.protobuf.Message>
RPC response closure.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
RpcRequestClosure
RPC request Closure encapsulates the RPC contexts.
|
class |
RpcResponseClosureAdapter<T extends com.google.protobuf.Message>
RpcResponseClosure adapter holds the response.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
RpcUtils.runClosureInExecutor(Executor executor,
Closure done,
Status status)
Run closure with status in specified executor
|
static Future<?> |
RpcUtils.runClosureInThread(Closure done)
Run closure with OK status in thread pool.
|
static Future<?> |
RpcUtils.runClosureInThread(Closure done,
Status status)
Run closure with status in thread pool.
|
| 限定符和类型 | 类和说明 |
|---|---|
static class |
LogManager.StableClosure
Closure to to run in stable state.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
SnapshotExecutor.doSnapshot(Closure done)
Start to snapshot StateMachine, and |done| is called after the
execution finishes or fails.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
SnapshotExecutorImpl.doSnapshot(Closure done) |
| 限定符和类型 | 方法和说明 |
|---|---|
static Future<?> |
Utils.runClosureInThread(Closure done)
Run closure with OK status in thread pool.
|
static Future<?> |
Utils.runClosureInThread(Closure done,
Status status)
Run closure with status in thread pool.
|
Copyright © 2021. All rights reserved.