org.neo4j.kernel.ha.cluster
Class SwitchToSlave

java.lang.Object
  extended by org.neo4j.kernel.ha.cluster.SwitchToSlave

public class SwitchToSlave
extends Object


Constructor Summary
SwitchToSlave(org.neo4j.kernel.logging.ConsoleLogger console, org.neo4j.kernel.configuration.Config config, org.neo4j.graphdb.DependencyResolver resolver, HaIdGeneratorFactory idGeneratorFactory, org.neo4j.kernel.logging.Logging logging, DelegateInvocationHandler<Master> masterDelegateHandler, org.neo4j.cluster.member.ClusterMemberAvailability clusterMemberAvailability, RequestContextFactory requestContextFactory)
           
 
Method Summary
 URI switchToSlave(org.neo4j.kernel.lifecycle.LifeSupport haCommunicationLife, URI me, URI masterUri, org.neo4j.helpers.CancellationRequest cancellationRequest)
          Performs a switch to the slave state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwitchToSlave

public SwitchToSlave(org.neo4j.kernel.logging.ConsoleLogger console,
                     org.neo4j.kernel.configuration.Config config,
                     org.neo4j.graphdb.DependencyResolver resolver,
                     HaIdGeneratorFactory idGeneratorFactory,
                     org.neo4j.kernel.logging.Logging logging,
                     DelegateInvocationHandler<Master> masterDelegateHandler,
                     org.neo4j.cluster.member.ClusterMemberAvailability clusterMemberAvailability,
                     RequestContextFactory requestContextFactory)
Method Detail

switchToSlave

public URI switchToSlave(org.neo4j.kernel.lifecycle.LifeSupport haCommunicationLife,
                         URI me,
                         URI masterUri,
                         org.neo4j.helpers.CancellationRequest cancellationRequest)
                  throws Throwable
Performs a switch to the slave state. Starts the communication endpoints, switches components to the slave state and ensures that the current database is appropriate for this cluster. It also broadcasts the appropriate Slave Is Available event

Parameters:
haCommunicationLife - The LifeSupport instance to register the network facilities required for communication with the rest of the cluster
me - The URI this instance must bind to
masterUri - The URI of the master for which this instance must become slave to
cancellationRequest - A handle for gracefully aborting the switch
Returns:
The URI that was broadcasted as the slave endpoint or null if the task was cancelled
Throws:
Throwable


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