public interface QuorumService<S extends HAGlue> extends QuorumMember<S>, QuorumRead<S>, QuorumCommit<S>, QuorumPipeline<S>
Quorum
defining
methods to support service specific high availability operations such as
reading on another member of the quorum, the 2-phase quorum commit protocol,
replicating writes, etc.
A QuorumService
participates in a write pipeline, which replicates
cache blocks from the leader and relays them from service to service in the
pipeline order
. The write pipeline is
responsible for ensuring that the followers will have the same persistent
state as the leader at each commit point. Services which are synchronizing
may also join the write pipeline in order to receive updates before they join
a met quorum. See QuorumPipeline
.
The leader uses a 2-phase commit protocol to ensure that the quorum enters
each commit point atomically and that followers can read historical commit
points, including on the prior commit point. See QuorumCommit
.
Persistent services use pre-record checksums to detect read errors and can
handle read failures by reading on another service joined with the quorum.
See QuorumRead
.
Modifier and Type | Method and Description |
---|---|
void |
discardWriteSet()
Discard all state associated with the current write set.
|
void |
enterErrorState()
Enter an error state.
|
long |
getLastCommitCounter()
Return the lastCommitCounter for this service (based on its current root
block).
|
long |
getLastCommitTime()
Return the lastCommitTime for this service (based on its current root
block).
|
int |
getPID()
Return the best guess at the process identifier for this process.
|
long |
getPrepareTimeout()
Return the configured timeout in milliseconds that the leader will await
the other services to prepare for a 2-phase commit.
|
File |
getServiceDir()
Return the service directory.
|
void |
installRootBlocks(IRootBlockView rootBlock0,
IRootBlockView rootBlock1)
Install root blocks on the local service.
|
assertLeader, getActor, getDownstreamServiceId, getExecutor, getService, getServiceId, isFollower, isJoinedMember, isLastInChain, isLeader, isMember, isPipelineMember
disconnected, getLeader, getLogicalServiceZPath, getQuorum, getService, start, terminate
notify
consensus, lostConsensus, memberAdd, memberRemove, pipelineAdd, pipelineChange, pipelineElectedLeader, pipelineRemove, pipelineUpstreamChange, quorumBreak, quorumMeet, serviceJoin, serviceLeave
readFromQuorum
abort2Phase, commit2Phase, prepare2Phase
getStoreUUID, logRootBlock, logWriteCacheBlock, purgeHALogs, receiveAndReplicate, replicate, resetPipeline
long getLastCommitTime()
getLastCommitTime
in interface QuorumPipeline<S extends HAGlue>
long getLastCommitCounter()
getLastCommitCounter
in interface QuorumPipeline<S extends HAGlue>
File getServiceDir()
int getPID()
long getPrepareTimeout()
void installRootBlocks(IRootBlockView rootBlock0, IRootBlockView rootBlock1)
Note: The initial root blocks on a service are identical, so this root block will be installed as both root block ZERO (0) and root block ONE (1).
rootBlock0
- Root block ZERO (0).rootBlock1
- Root block ONE (1).void enterErrorState()
void discardWriteSet()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.