public class ElectionContextImpl extends Object implements ElectionContext, HeartbeatListener
ElectionContext.VoteRequestHeartbeatListener.AdaptergetClass, notify, notifyAll, toString, wait, wait, waitcancelTimeout, getTimeoutFor, setTimeoutgetLogboundAt, getCoordinator, getIdForUri, getMembers, getMemberURIs, getUriForId, isMepublic void created()
created in interface ElectionContextpublic List<ElectionRole> getPossibleRoles()
getPossibleRoles in interface ElectionContextpublic void nodeFailed(InstanceId node)
nodeFailed in interface ElectionContextpublic Iterable<String> getRoles(InstanceId server)
getRoles in interface ElectionContextpublic ClusterContext getClusterContext()
public HeartbeatContext getHeartbeatContext()
public boolean isElectionProcessInProgress(String role)
isElectionProcessInProgress in interface ElectionContextpublic void startElectionProcess(String role)
startElectionProcess in interface ElectionContextpublic boolean voted(String role, InstanceId suggestedNode, ElectionCredentials suggestionCredentials, long electionVersion)
voted in interface ElectionContextpublic InstanceId getElectionWinner(String role)
getElectionWinner in interface ElectionContextpublic ElectionCredentials getCredentialsForRole(String role)
getCredentialsForRole in interface ElectionContextpublic int getVoteCount(String role)
getVoteCount in interface ElectionContextpublic int getNeededVoteCount()
getNeededVoteCount in interface ElectionContextpublic void forgetElection(String role)
forgetElection in interface ElectionContextpublic Iterable<String> getRolesRequiringElection()
getRolesRequiringElection in interface ElectionContextpublic boolean electionOk()
electionOk in interface ElectionContextpublic boolean isInCluster()
isInCluster in interface ElectionContextpublic Iterable<InstanceId> getAlive()
getAlive in interface ElectionContextpublic InstanceId getMyId()
getMyId in interface ConfigurationContextpublic boolean isElector()
isElector in interface ElectionContextpublic boolean isFailed(InstanceId key)
isFailed in interface ElectionContextpublic InstanceId getElected(String roleName)
getElected in interface ElectionContextpublic boolean hasCurrentlyElectedVoted(String role, InstanceId currentElected)
hasCurrentlyElectedVoted in interface ElectionContextpublic Set<InstanceId> getFailed()
getFailed in interface ElectionContextpublic ElectionContextImpl snapshot(org.neo4j.cluster.protocol.atomicbroadcast.multipaxos.context.CommonContextState commonStateSnapshot, org.neo4j.logging.LogProvider logging, Timeouts timeouts, org.neo4j.cluster.protocol.atomicbroadcast.multipaxos.context.ClusterContextImpl snapshotClusterContext, org.neo4j.cluster.protocol.atomicbroadcast.multipaxos.context.HeartbeatContextImpl snapshotHeartbeatContext, ElectionCredentialsProvider credentialsProvider)
public ClusterMessage.VersionedConfigurationStateChange newConfigurationStateChange()
newConfigurationStateChange in interface ElectionContextpublic ElectionContext.VoteRequest voteRequestForRole(ElectionRole role)
voteRequestForRole in interface ElectionContextpublic void failed(InstanceId server)
failed in interface HeartbeatListenerpublic void alive(InstanceId server)
alive in interface HeartbeatListenerpublic static List<Vote> removeBlankVotes(Collection<Vote> voteList)
public org.neo4j.logging.Log getLog(Class loggingClass)
getLog in interface LoggingContextpublic void setTimeout(Object key, Message<? extends MessageType> timeoutMessage)
setTimeout in interface TimeoutsContextpublic long getTimeoutFor(Message<? extends MessageType> timeoutMessage)
getTimeoutFor in interface TimeoutsContextpublic Message<? extends MessageType> cancelTimeout(Object key)
cancelTimeout in interface TimeoutsContextpublic List<URI> getMemberURIs()
getMemberURIs in interface ConfigurationContextpublic URI boundAt()
boundAt in interface ConfigurationContextpublic Map<InstanceId,URI> getMembers()
getMembers in interface ConfigurationContextpublic InstanceId getCoordinator()
getCoordinator in interface ConfigurationContextpublic URI getUriForId(InstanceId node)
getUriForId in interface ConfigurationContextpublic InstanceId getIdForUri(URI uri)
getIdForUri in interface ConfigurationContextpublic boolean isMe(InstanceId server)
isMe in interface ConfigurationContextCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.