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()
IHA2PhasePrepareMessage
getConsensusReleaseTime
in interface IHA2PhasePrepareMessage
public boolean isGatherService()
IHA2PhasePrepareMessage
true
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 IHA2PhasePrepareMessage
public boolean isJoinedService()
IHA2PhasePrepareMessage
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.
Note: A better name for this flag would be isPrepareService()
.
isJoinedService
in interface IHA2PhasePrepareMessage
public boolean isRootBlock0()
IHA2PhasePrepareMessage
true
if this is rootBlock0 for the leader.isRootBlock0
in interface IHA2PhasePrepareMessage
public IRootBlockView getRootBlock()
IHA2PhasePrepareMessage
getRootBlock
in interface IHA2PhasePrepareMessage
public long getTimeout()
IHA2PhasePrepareMessage
getTimeout
in interface IHA2PhasePrepareMessage
public TimeUnit getUnit()
IHA2PhasePrepareMessage
getUnit
in interface IHA2PhasePrepareMessage
public boolean voteNo()
true
, always vote note.
Note: This is for unit tests only.
Returns false
by default
voteNo
in interface IHA2PhasePrepareMessage
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.