| Package | Description |
|---|---|
| org.apache.ratis.server.raftlog | |
| org.apache.ratis.statemachine | |
| org.apache.ratis.statemachine.impl |
| Modifier and Type | Method and Description |
|---|---|
long |
RaftLog.append(long term,
TransactionContext transaction) |
| Modifier and Type | Method and Description |
|---|---|
TransactionContext |
StateMachine.applyTransactionSerial(TransactionContext trx)
Called for transactions that have been committed to the RAFT log.
|
TransactionContext |
TransactionContext.Builder.build() |
TransactionContext |
TransactionContext.cancelTransaction()
Called to notify the state machine that the Transaction passed cannot be appended (or synced).
|
TransactionContext |
StateMachine.cancelTransaction(TransactionContext trx)
Called to notify the state machine that the Transaction passed cannot be appended (or synced).
|
TransactionContext |
TransactionContext.preAppendTransaction()
This is called before the transaction passed from the StateMachine is appended to the raft log.
|
TransactionContext |
StateMachine.preAppendTransaction(TransactionContext trx)
This is called before the transaction passed from the StateMachine is appended to the raft log.
|
TransactionContext |
TransactionContext.setException(Exception exception)
Set exception in case of failure.
|
TransactionContext |
TransactionContext.setShouldCommit(boolean shouldCommit)
Sets whether to commit the transaction to the RAFT log or not
|
TransactionContext |
TransactionContext.setStateMachineContext(Object stateMachineContext)
Sets the
StateMachine the TransactionContext is specific to, the method would
not create a new transaction context, it updates the StateMachine it associates with |
TransactionContext |
TransactionContext.setStateMachineLogEntryProto(org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto smLogEntryProto)
Sets the data from the
StateMachine |
TransactionContext |
StateMachine.startTransaction(RaftClientRequest request)
Validate/pre-process the incoming update request in the state machine.
|
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Message> |
StateMachine.applyTransaction(TransactionContext trx)
Apply a committed log entry to the state machine.
|
TransactionContext |
StateMachine.applyTransactionSerial(TransactionContext trx)
Called for transactions that have been committed to the RAFT log.
|
TransactionContext |
StateMachine.cancelTransaction(TransactionContext trx)
Called to notify the state machine that the Transaction passed cannot be appended (or synced).
|
TransactionContext |
StateMachine.preAppendTransaction(TransactionContext trx)
This is called before the transaction passed from the StateMachine is appended to the raft log.
|
| Modifier and Type | Method and Description |
|---|---|
void |
StateMachine.notifyNotLeader(Collection<TransactionContext> pendingEntries)
Notify the state machine that the raft peer is no longer leader.
|
| Modifier and Type | Class and Description |
|---|---|
class |
TransactionContextImpl
Implementation of
TransactionContext
This is a private API. |
| Modifier and Type | Method and Description |
|---|---|
TransactionContext |
BaseStateMachine.applyTransactionSerial(TransactionContext trx) |
TransactionContext |
TransactionContextImpl.cancelTransaction() |
TransactionContext |
BaseStateMachine.cancelTransaction(TransactionContext trx) |
TransactionContext |
TransactionContextImpl.preAppendTransaction() |
TransactionContext |
BaseStateMachine.preAppendTransaction(TransactionContext trx) |
TransactionContext |
TransactionContextImpl.setException(Exception ioe) |
TransactionContext |
TransactionContextImpl.setShouldCommit(boolean sCommit) |
TransactionContext |
TransactionContextImpl.setStateMachineContext(Object context) |
TransactionContext |
TransactionContextImpl.setStateMachineLogEntryProto(org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto logEntryProto) |
TransactionContext |
BaseStateMachine.startTransaction(RaftClientRequest request) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Message> |
BaseStateMachine.applyTransaction(TransactionContext trx) |
TransactionContext |
BaseStateMachine.applyTransactionSerial(TransactionContext trx) |
TransactionContext |
BaseStateMachine.cancelTransaction(TransactionContext trx) |
TransactionContext |
BaseStateMachine.preAppendTransaction(TransactionContext trx) |
| Modifier and Type | Method and Description |
|---|---|
void |
BaseStateMachine.notifyNotLeader(Collection<TransactionContext> pendingEntries) |
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.