public interface HACommitGlue extends Remote
Remote interface supporting a 2-phase commit protocol for the
members of a highly available quorum.QuorumCommit| Modifier and Type | Method and Description |
|---|---|
Future<Void> |
abort2Phase(IHA2PhaseAbortMessage abortMessage)
Discard the current write set using
AbstractJournal.abort(),
reloading all state from the last root block, etc. |
Future<Void> |
commit2Phase(IHA2PhaseCommitMessage commitMessage)
Commit using the root block from the corresponding prepare message.
|
Future<Boolean> |
prepare2Phase(IHA2PhasePrepareMessage prepareMessage)
Save a reference to the caller's root block, flush writes to the backing
channel and acknowledge "yes" if ready to commit.
|
Future<Boolean> prepare2Phase(IHA2PhasePrepareMessage prepareMessage) throws IOException
prepareMessage - The message used to prepare for the commit.Future which evaluates to a yes/no vote on whether the
service is prepared to commit.IOExceptionFuture<Void> commit2Phase(IHA2PhaseCommitMessage commitMessage) throws IOException
commitMessage - The commit message.IOExceptionFuture<Void> abort2Phase(IHA2PhaseAbortMessage abortMessage) throws IOException
AbstractJournal.abort(),
reloading all state from the last root block, etc.
Note: A service automatically does a local abort() if it leaves the pool of services joined with the quorum or if the leader fails over. Therefore a service should reject this message if the token has been invalidated since the service either has dine or will shortly do a low-level abort() on its own initiative.
token - The token for the quorum for which this request was made.IOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.