org.neo4j.kernel.ha.cluster
Class HighAvailabilityModeSwitcher
java.lang.Object
org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher
- All Implemented Interfaces:
- HighAvailabilityMemberListener, org.neo4j.kernel.lifecycle.Lifecycle
public class HighAvailabilityModeSwitcher
- extends Object
- implements HighAvailabilityMemberListener, org.neo4j.kernel.lifecycle.Lifecycle
Performs the internal switches from pending to slave/master, by listening for
ClusterMemberChangeEvents. When finished it will invoke ClusterMemberAvailability.memberIsAvailable(String, URI) to announce
to the cluster it's new status.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MASTER
public static final String MASTER
- See Also:
- Constant Field Values
SLAVE
public static final String SLAVE
- See Also:
- Constant Field Values
HighAvailabilityModeSwitcher
public HighAvailabilityModeSwitcher(DelegateInvocationHandler delegateHandler,
org.neo4j.cluster.member.ClusterMemberAvailability clusterMemberAvailability,
HighAvailabilityMemberStateMachine stateHandler,
org.neo4j.kernel.GraphDatabaseAPI graphDb,
HaIdGeneratorFactory idGeneratorFactory,
org.neo4j.kernel.configuration.Config config,
org.neo4j.kernel.logging.Logging logging,
org.neo4j.kernel.impl.api.UpdateableSchemaState updateableSchemaState)
getServerId
public static int getServerId(URI haUri)
init
public void init()
throws Throwable
- Specified by:
init in interface org.neo4j.kernel.lifecycle.Lifecycle
- Throws:
Throwable
start
public void start()
throws Throwable
- Specified by:
start in interface org.neo4j.kernel.lifecycle.Lifecycle
- Throws:
Throwable
stop
public void stop()
throws Throwable
- Specified by:
stop in interface org.neo4j.kernel.lifecycle.Lifecycle
- Throws:
Throwable
shutdown
public void shutdown()
throws Throwable
- Specified by:
shutdown in interface org.neo4j.kernel.lifecycle.Lifecycle
- Throws:
Throwable
masterIsElected
public void masterIsElected(HighAvailabilityMemberChangeEvent event)
- Specified by:
masterIsElected in interface HighAvailabilityMemberListener
masterIsAvailable
public void masterIsAvailable(HighAvailabilityMemberChangeEvent event)
- Specified by:
masterIsAvailable in interface HighAvailabilityMemberListener
slaveIsAvailable
public void slaveIsAvailable(HighAvailabilityMemberChangeEvent event)
- Specified by:
slaveIsAvailable in interface HighAvailabilityMemberListener
instanceStops
public void instanceStops(HighAvailabilityMemberChangeEvent event)
- Specified by:
instanceStops in interface HighAvailabilityMemberListener
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.