public enum HighAvailabilityMemberState extends Enum<HighAvailabilityMemberState>
| Enum Constant and Description |
|---|
ILLEGAL |
MASTER
Cluster member is available as master for other cluster members to use.
|
PENDING
This state is the initial state, and is also the state used when leaving the cluster.
|
SLAVE
Cluster member is ready as a slave
|
TO_MASTER
The cluster member knows that it has been elected as master, and starts the transitioning process.
|
TO_SLAVE
Member now knows that a master is available, and is transitioning itself to become a slave to that master.
|
| Modifier and Type | Method and Description |
|---|---|
String |
errorMessage() |
abstract boolean |
isAccessAllowed() |
abstract boolean |
isEligibleForElection()
The purpose of this is that an instance cannot vote in an election while becoming a slave,
as it is copying stores.
|
abstract HighAvailabilityMemberState |
masterIsAvailable(HighAvailabilityMemberContext context,
org.neo4j.cluster.InstanceId masterId,
URI masterHaURI) |
abstract HighAvailabilityMemberState |
masterIsElected(HighAvailabilityMemberContext context,
org.neo4j.cluster.InstanceId masterId) |
abstract HighAvailabilityMemberState |
slaveIsAvailable(HighAvailabilityMemberContext context,
org.neo4j.cluster.InstanceId slaveId,
URI slaveUri) |
static HighAvailabilityMemberState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HighAvailabilityMemberState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HighAvailabilityMemberState PENDING
Here we are waiting for events that transitions this member either to becoming a master or slave.
public static final HighAvailabilityMemberState TO_SLAVE
public static final HighAvailabilityMemberState TO_MASTER
public static final HighAvailabilityMemberState MASTER
public static final HighAvailabilityMemberState SLAVE
public static final HighAvailabilityMemberState ILLEGAL
public static HighAvailabilityMemberState[] values()
for (HighAvailabilityMemberState c : HighAvailabilityMemberState.values()) System.out.println(c);
public static HighAvailabilityMemberState valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract HighAvailabilityMemberState masterIsElected(HighAvailabilityMemberContext context, org.neo4j.cluster.InstanceId masterId)
public abstract HighAvailabilityMemberState masterIsAvailable(HighAvailabilityMemberContext context, org.neo4j.cluster.InstanceId masterId, URI masterHaURI)
public abstract HighAvailabilityMemberState slaveIsAvailable(HighAvailabilityMemberContext context, org.neo4j.cluster.InstanceId slaveId, URI slaveUri)
public abstract boolean isEligibleForElection()
public abstract boolean isAccessAllowed()
public String errorMessage()
Copyright © 2002–2019 The Neo4j Graph Database Project. All rights reserved.