org.neo4j.kernel.ha
Class HighAvailabilityConsoleLogger

java.lang.Object
  extended by org.neo4j.kernel.ha.HighAvailabilityConsoleLogger
All Implemented Interfaces:
org.neo4j.cluster.member.ClusterMemberListener, org.neo4j.cluster.protocol.cluster.ClusterListener, org.neo4j.kernel.AvailabilityGuard.AvailabilityListener

public class HighAvailabilityConsoleLogger
extends Object
implements org.neo4j.cluster.member.ClusterMemberListener, org.neo4j.cluster.protocol.cluster.ClusterListener, org.neo4j.kernel.AvailabilityGuard.AvailabilityListener

This class logs to the console whenever important cluster or high availability events are issued.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.neo4j.cluster.member.ClusterMemberListener
org.neo4j.cluster.member.ClusterMemberListener.Adapter
 
Nested classes/interfaces inherited from interface org.neo4j.cluster.protocol.cluster.ClusterListener
org.neo4j.cluster.protocol.cluster.ClusterListener.Adapter
 
Constructor Summary
HighAvailabilityConsoleLogger(org.neo4j.kernel.logging.ConsoleLogger console, org.neo4j.cluster.InstanceId myId)
           
 
Method Summary
 void available()
          Logged when users are allowed to access the database for transactions.
 void coordinatorIsElected(org.neo4j.cluster.InstanceId coordinatorId)
           
 void elected(String role, org.neo4j.cluster.InstanceId instanceId, URI electedMember)
          Logged when an instance is elected for a role, such as coordinator of a cluster.
 void enteredCluster(org.neo4j.cluster.protocol.cluster.ClusterConfiguration clusterConfiguration)
          Logged when the instance itself joins or rejoins a cluster
 void joinedCluster(org.neo4j.cluster.InstanceId instanceId, URI member)
          Logged when another instance joins the cluster
 void leftCluster()
          Logged when the instance itself leaves the cluster
 void leftCluster(org.neo4j.cluster.InstanceId instanceId, URI member)
          Logged when another instance leaves the cluster
 void memberIsAlive(org.neo4j.cluster.InstanceId instanceId)
          Logged when another instance is detected as being alive again.
 void memberIsAvailable(String role, org.neo4j.cluster.InstanceId availableId, URI atUri)
          Logged when a member becomes available as a role, such as MASTER or SLAVE.
 void memberIsFailed(org.neo4j.cluster.InstanceId instanceId)
          Logged when another instance is detected as being failed.
 void memberIsUnavailable(String role, org.neo4j.cluster.InstanceId unavailableId)
          Logged when a member becomes unavailable as a role, such as MASTER or SLAVE.
 void unavailable()
          Logged when users are not allowed to access the database for transactions.
 void unelected(String role, org.neo4j.cluster.InstanceId instanceId, URI electedMember)
          Logged when an instance is demoted from a role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighAvailabilityConsoleLogger

public HighAvailabilityConsoleLogger(org.neo4j.kernel.logging.ConsoleLogger console,
                                     org.neo4j.cluster.InstanceId myId)
Method Detail

enteredCluster

public void enteredCluster(org.neo4j.cluster.protocol.cluster.ClusterConfiguration clusterConfiguration)
Logged when the instance itself joins or rejoins a cluster

Specified by:
enteredCluster in interface org.neo4j.cluster.protocol.cluster.ClusterListener
Parameters:
clusterConfiguration -

leftCluster

public void leftCluster()
Logged when the instance itself leaves the cluster

Specified by:
leftCluster in interface org.neo4j.cluster.protocol.cluster.ClusterListener

joinedCluster

public void joinedCluster(org.neo4j.cluster.InstanceId instanceId,
                          URI member)
Logged when another instance joins the cluster

Specified by:
joinedCluster in interface org.neo4j.cluster.protocol.cluster.ClusterListener
Parameters:
instanceId -
member -

leftCluster

public void leftCluster(org.neo4j.cluster.InstanceId instanceId,
                        URI member)
Logged when another instance leaves the cluster

Specified by:
leftCluster in interface org.neo4j.cluster.protocol.cluster.ClusterListener
Parameters:
instanceId -

elected

public void elected(String role,
                    org.neo4j.cluster.InstanceId instanceId,
                    URI electedMember)
Logged when an instance is elected for a role, such as coordinator of a cluster.

Specified by:
elected in interface org.neo4j.cluster.protocol.cluster.ClusterListener
Parameters:
role -
instanceId -
electedMember -

unelected

public void unelected(String role,
                      org.neo4j.cluster.InstanceId instanceId,
                      URI electedMember)
Logged when an instance is demoted from a role.

Specified by:
unelected in interface org.neo4j.cluster.protocol.cluster.ClusterListener
Parameters:
role -
instanceId -
electedMember -

coordinatorIsElected

public void coordinatorIsElected(org.neo4j.cluster.InstanceId coordinatorId)
Specified by:
coordinatorIsElected in interface org.neo4j.cluster.member.ClusterMemberListener

memberIsAvailable

public void memberIsAvailable(String role,
                              org.neo4j.cluster.InstanceId availableId,
                              URI atUri)
Logged when a member becomes available as a role, such as MASTER or SLAVE.

Specified by:
memberIsAvailable in interface org.neo4j.cluster.member.ClusterMemberListener
Parameters:
role -
availableId - the role connection information for the new role holder
atUri - the URI at which the instance is available at

memberIsUnavailable

public void memberIsUnavailable(String role,
                                org.neo4j.cluster.InstanceId unavailableId)
Logged when a member becomes unavailable as a role, such as MASTER or SLAVE.

Specified by:
memberIsUnavailable in interface org.neo4j.cluster.member.ClusterMemberListener
Parameters:
role - The role for which the member is unavailable
unavailableId - The id of the member which became unavailable for that role

memberIsFailed

public void memberIsFailed(org.neo4j.cluster.InstanceId instanceId)
Logged when another instance is detected as being failed.

Specified by:
memberIsFailed in interface org.neo4j.cluster.member.ClusterMemberListener
Parameters:
instanceId -

memberIsAlive

public void memberIsAlive(org.neo4j.cluster.InstanceId instanceId)
Logged when another instance is detected as being alive again.

Specified by:
memberIsAlive in interface org.neo4j.cluster.member.ClusterMemberListener
Parameters:
instanceId -

available

public void available()
Logged when users are allowed to access the database for transactions.

Specified by:
available in interface org.neo4j.kernel.AvailabilityGuard.AvailabilityListener

unavailable

public void unavailable()
Logged when users are not allowed to access the database for transactions.

Specified by:
unavailable in interface org.neo4j.kernel.AvailabilityGuard.AvailabilityListener


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