public class TransactionContextImpl extends Object implements TransactionContext
TransactionContext
This is a private API. Applications should use TransactionContext and TransactionContext.Builder.TransactionContext.Builder| Modifier and Type | Method and Description |
|---|---|
TransactionContext |
cancelTransaction() |
RaftClientRequest |
getClientRequest() |
Exception |
getException() |
org.apache.ratis.proto.RaftProtos.LogEntryProto |
getLogEntry() |
org.apache.ratis.proto.RaftProtos.RaftPeerRole |
getServerRole() |
Object |
getStateMachineContext() |
org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto |
getStateMachineLogEntry() |
org.apache.ratis.proto.RaftProtos.LogEntryProto |
initLogEntry(long term,
long index) |
TransactionContext |
preAppendTransaction() |
TransactionContext |
setException(Exception ioe) |
TransactionContext |
setShouldCommit(boolean sCommit) |
TransactionContext |
setStateMachineContext(Object context) |
boolean |
shouldCommit() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewBuilderpublic org.apache.ratis.proto.RaftProtos.RaftPeerRole getServerRole()
getServerRole in interface TransactionContextpublic RaftClientRequest getClientRequest()
getClientRequest in interface TransactionContextpublic org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto getStateMachineLogEntry()
getStateMachineLogEntry in interface TransactionContextpublic Exception getException()
getException in interface TransactionContextpublic TransactionContext setStateMachineContext(Object context)
setStateMachineContext in interface TransactionContextpublic Object getStateMachineContext()
getStateMachineContext in interface TransactionContextpublic org.apache.ratis.proto.RaftProtos.LogEntryProto initLogEntry(long term, long index)
initLogEntry in interface TransactionContextpublic org.apache.ratis.proto.RaftProtos.LogEntryProto getLogEntry()
getLogEntry in interface TransactionContextpublic TransactionContext setException(Exception ioe)
setException in interface TransactionContextpublic TransactionContext setShouldCommit(boolean sCommit)
setShouldCommit in interface TransactionContextpublic boolean shouldCommit()
shouldCommit in interface TransactionContextpublic TransactionContext preAppendTransaction() throws IOException
preAppendTransaction in interface TransactionContextIOExceptionpublic TransactionContext cancelTransaction() throws IOException
cancelTransaction in interface TransactionContextIOExceptionCopyright © 2017–2023 The Apache Software Foundation. All rights reserved.