public class HA2PhaseCommitMessage extends Object implements IHA2PhaseCommitMessage, Serializable
Constructor and Description |
---|
HA2PhaseCommitMessage(boolean isJoinedService,
long commitTime,
boolean didAllServicesPrepare) |
Modifier and Type | Method and Description |
---|---|
boolean |
didAllServicesPrepare()
Return
true iff all services voted "YES" for PREPARE. |
boolean |
failCommit_beforeClosingHALog()
When
true the COMMIT message will fail within the
commit2Phase implementation. |
boolean |
failCommit_beforeWritingRootBlockOnJournal()
When
true the COMMIT message will fail within the
commit2Phase implementation. |
long |
getCommitTime()
The commit time that will be assigned to the new commit point.
|
boolean |
isJoinedService()
true iff the service was recognized as being joined with the
met quorum at the time that the prepare message was prepared. |
String |
toString() |
public HA2PhaseCommitMessage(boolean isJoinedService, long commitTime, boolean didAllServicesPrepare)
public boolean isJoinedService()
IHA2PhaseCommitMessage
true
iff the service was recognized as being joined with the
met quorum at the time that the prepare message was prepared.
Note: This is used to support atomic decisions about whether or not a service was joined with the met quorum at the time that the leader decided to commit. Services that are in the pipeline and resynchronizing will either be joined or not for the purposes of a given 2-phase commit based on this flag.
isJoinedService
in interface IHA2PhaseCommitMessage
public long getCommitTime()
IHA2PhaseCommitMessage
getCommitTime
in interface IHA2PhaseCommitMessage
public boolean didAllServicesPrepare()
IHA2PhaseCommitMessage
true
iff all services voted "YES" for PREPARE. When
false
, not all services will participate in this commit (but
the commit will still be performed).didAllServicesPrepare
in interface IHA2PhaseCommitMessage
public boolean failCommit_beforeWritingRootBlockOnJournal()
IHA2PhaseCommitMessage
true
the COMMIT message will fail within the
commit2Phase implementation. An exception will be thrown immeditely
before the new root block is written onto the journal.
Note: This is for unit tests only.
failCommit_beforeWritingRootBlockOnJournal
in interface IHA2PhaseCommitMessage
public boolean failCommit_beforeClosingHALog()
IHA2PhaseCommitMessage
true
the COMMIT message will fail within the
commit2Phase implementation. An exception will be thrown immeditely
before the closing root block is written onto the HALog file.
Note: This is for unit tests only.
failCommit_beforeClosingHALog
in interface IHA2PhaseCommitMessage
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.