public static class MockQuorumFixture.MockQuorum<S extends Remote,C extends QuorumMember<S>> extends AbstractQuorum<S,C>
Quorum implementation with increased visibility of some
methods so we can pump state changes into the MockQuorumFixture2.| Modifier and Type | Class and Description |
|---|---|
protected class |
MockQuorumFixture.MockQuorum.MockQuorumActor
Actor updates the state of the
MockQuorumFixture2. |
protected class |
MockQuorumFixture.MockQuorum.MockQuorumWatcher
Watcher propagates state changes observed in the
MockQuorumFixture2 to the MockQuorumFixture.MockQuorum. |
AbstractQuorum.E, AbstractQuorum.QuorumActorBase, AbstractQuorum.QuorumWatcherBaseERR_BAD_TOKEN, ERR_CAN_NOT_MEET, ERR_NOT_IN_CONSENSUS, ERR_NOT_MEMBER, ERR_NOT_PIPELINE, ERR_QUORUM_BREAK, ERR_QUORUM_MET, kmeet, lock, log, qlog| Constructor and Description |
|---|
MockQuorumFixture.MockQuorum(int k,
MockQuorumFixture fixture) |
| Modifier and Type | Method and Description |
|---|---|
MockQuorumFixture.MockQuorum.MockQuorumActor |
getActor()
Exposed to the unit tests which use the returned
QuorumActor
to send state change requests to the MockQuorumFixture2. |
protected AbstractQuorum.QuorumActorBase |
newActor(String logicalServiceId,
UUID serviceId)
Factory method invoked by
AbstractQuorum.start(QuorumClient) iff the
QuorumClient is a QuorumMember. |
protected AbstractQuorum.QuorumWatcherBase |
newWatcher(String logicalServiceUUID)
Factory method invoked by
AbstractQuorum.start(QuorumClient). |
void |
start(C client)
Begin asynchronous processing.
|
void |
terminate()
Terminate any asynchronous processing associated with maintaining the
Quorum state. |
addListener, assertLeader, assertQuorum, awaitBreak, awaitBreak, awaitQuorum, awaitQuorum, finalize, getCastVote, getCastVoteIfConsensus, getClient, getClientNoLock, getJoined, getLastInPipeline, getLastValidTokenFromQuorumState, getLeaderId, getMember, getMembers, getPipeline, getPipelinePriorAndNext, getVotes, getWatcher, guard, interruptAll, isHighlyAvailable, isQuorum, isQuorumFullyMet, isQuorumMet, lastValidToken, launderThrowable, removeListener, replicationFactor, sendEvent, token, toString, toStringAtomicpublic MockQuorumFixture.MockQuorum(int k,
MockQuorumFixture fixture)
protected AbstractQuorum.QuorumActorBase newActor(String logicalServiceId, UUID serviceId)
AbstractQuorumAbstractQuorum.start(QuorumClient) iff the
QuorumClient is a QuorumMember.newActor in class AbstractQuorum<S extends Remote,C extends QuorumMember<S>>logicalServiceId - The identifier of the logical service corresponding to the
highly available quorum.serviceId - The UUID of the service on whose behalf the actor will
act.QuorumActor which will effect changes in the
distributed state of the quorum.protected AbstractQuorum.QuorumWatcherBase newWatcher(String logicalServiceUUID)
AbstractQuorumAbstractQuorum.start(QuorumClient).
Note: Additional information can be passed to the watcher factor by
derived classes. For example, the UUID of the logical service to
newWatcher in class AbstractQuorum<S extends Remote,C extends QuorumMember<S>>logicalServiceUUID - The identifier of the logical service whose quorum state
will be watched.QuorumWatcher which will inform this
AbstactQuorum of changes occurring in the distributed
state of the quorum.public MockQuorumFixture.MockQuorum.MockQuorumActor getActor()
QuorumActor
to send state change requests to the MockQuorumFixture2. From
there, they are noticed by the MockQuorumFixture.MockQuorum.MockQuorumWatcher and become
visible to the client's MockQuorumFixture.MockQuorum.getActor in interface Quorum<S extends Remote,C extends QuorumMember<S>>getActor in class AbstractQuorum<S extends Remote,C extends QuorumMember<S>>QuorumActor which will effect changes in the
distributed state of the quorum -or- null if the
client is not a QuorumMember (only quorum members can
take actions which effect the distributed quorum state).public void start(C client)
AbstractQuorumQuorumListener, the QuorumActor
and QuorumWatcher are created, and asynchronous discovery is
initialized for the QuorumWatcher.start in interface Quorum<S extends Remote,C extends QuorumMember<S>>start in class AbstractQuorum<S extends Remote,C extends QuorumMember<S>>public void terminate()
QuorumQuorum state.terminate in interface Quorum<S extends Remote,C extends QuorumMember<S>>terminate in class AbstractQuorum<S extends Remote,C extends QuorumMember<S>>Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.