public class HA2PhasePrepareMessage extends Object implements IHA2PhasePrepareMessage, Serializable
| Constructor and Description |
|---|
HA2PhasePrepareMessage(IHANotifyReleaseTimeResponse consensusReleaseTime,
boolean isGatherService,
boolean isJoinedService,
IRootBlockView rootBlock,
long timeout,
TimeUnit unit) |
| Modifier and Type | Method and Description |
|---|---|
IHANotifyReleaseTimeResponse |
getConsensusReleaseTime()
The consensus release time from the GATHER.
|
IRootBlockView |
getRootBlock()
The new root block.
|
long |
getTimeout()
How long to wait for the other services to prepare.
|
TimeUnit |
getUnit()
The unit for the timeout.
|
boolean |
isGatherService()
true iff the service was recognized as being joined with the
met quorum at the time that the GATHER message was prepared. |
boolean |
isJoinedService()
true iff the service was recognized as being joined with the
met quorum at the time that the PREPARE message was prepared. |
boolean |
isRootBlock0()
true if this is rootBlock0 for the leader. |
String |
toString() |
boolean |
voteNo()
When
true, always vote note. |
public HA2PhasePrepareMessage(IHANotifyReleaseTimeResponse consensusReleaseTime, boolean isGatherService, boolean isJoinedService, IRootBlockView rootBlock, long timeout, TimeUnit unit)
public IHANotifyReleaseTimeResponse getConsensusReleaseTime()
IHA2PhasePrepareMessagegetConsensusReleaseTime in interface IHA2PhasePrepareMessagepublic boolean isGatherService()
IHA2PhasePrepareMessagetrue iff the service was recognized as being joined with the
met quorum at the time that the GATHER 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 update the consensus release time. Services that are in the pipeline and resynchronizing were either joined or not for the purposes of a given 2-phase GATHER operation based on this flag.
isGatherService in interface IHA2PhasePrepareMessagepublic boolean isJoinedService()
IHA2PhasePrepareMessagetrue 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.
Note: A better name for this flag would be isPrepareService().
isJoinedService in interface IHA2PhasePrepareMessagepublic boolean isRootBlock0()
IHA2PhasePrepareMessagetrue if this is rootBlock0 for the leader.isRootBlock0 in interface IHA2PhasePrepareMessagepublic IRootBlockView getRootBlock()
IHA2PhasePrepareMessagegetRootBlock in interface IHA2PhasePrepareMessagepublic long getTimeout()
IHA2PhasePrepareMessagegetTimeout in interface IHA2PhasePrepareMessagepublic TimeUnit getUnit()
IHA2PhasePrepareMessagegetUnit in interface IHA2PhasePrepareMessagepublic boolean voteNo()
true, always vote note.
Note: This is for unit tests only.
Returns false by default
voteNo in interface IHA2PhasePrepareMessageCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.