org.neo4j.kernel.ha.cluster
Class HighAvailabilityMemberStateMachine

java.lang.Object
  extended by org.neo4j.kernel.lifecycle.LifecycleAdapter
      extended by org.neo4j.kernel.ha.cluster.HighAvailabilityMemberStateMachine
All Implemented Interfaces:
HighAvailability, org.neo4j.kernel.lifecycle.Lifecycle

public class HighAvailabilityMemberStateMachine
extends org.neo4j.kernel.lifecycle.LifecycleAdapter
implements HighAvailability

State machine that listens for global cluster events, and coordinates the internal transitions between ClusterMemberStates. Internal services that wants to know what is going on should register ClusterMemberListener implementations which will receive callbacks on state changes.


Constructor Summary
HighAvailabilityMemberStateMachine(HighAvailabilityMemberContext context, InstanceAccessGuard accessGuard, org.neo4j.cluster.member.ClusterMemberEvents events, org.neo4j.kernel.impl.util.StringLogger logger)
           
 
Method Summary
 void addHighAvailabilityMemberListener(HighAvailabilityMemberListener toAdd)
           
 HighAvailabilityMemberState getCurrentState()
           
 void init()
           
 void removeHighAvailabilityMemberListener(HighAvailabilityMemberListener toRemove)
           
 void stop()
           
 
Methods inherited from class org.neo4j.kernel.lifecycle.LifecycleAdapter
shutdown, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighAvailabilityMemberStateMachine

public HighAvailabilityMemberStateMachine(HighAvailabilityMemberContext context,
                                          InstanceAccessGuard accessGuard,
                                          org.neo4j.cluster.member.ClusterMemberEvents events,
                                          org.neo4j.kernel.impl.util.StringLogger logger)
Method Detail

init

public void init()
          throws Throwable
Specified by:
init in interface org.neo4j.kernel.lifecycle.Lifecycle
Overrides:
init in class org.neo4j.kernel.lifecycle.LifecycleAdapter
Throws:
Throwable

stop

public void stop()
          throws Throwable
Specified by:
stop in interface org.neo4j.kernel.lifecycle.Lifecycle
Overrides:
stop in class org.neo4j.kernel.lifecycle.LifecycleAdapter
Throws:
Throwable

addHighAvailabilityMemberListener

public void addHighAvailabilityMemberListener(HighAvailabilityMemberListener toAdd)
Specified by:
addHighAvailabilityMemberListener in interface HighAvailability

removeHighAvailabilityMemberListener

public void removeHighAvailabilityMemberListener(HighAvailabilityMemberListener toRemove)
Specified by:
removeHighAvailabilityMemberListener in interface HighAvailability

getCurrentState

public HighAvailabilityMemberState getCurrentState()


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.