org.neo4j.cluster
Class StateMachines
java.lang.Object
org.neo4j.cluster.StateMachines
- All Implemented Interfaces:
- org.neo4j.cluster.com.message.MessageProcessor, org.neo4j.cluster.com.message.MessageSource
public class StateMachines
- extends Object
- implements org.neo4j.cluster.com.message.MessageProcessor, org.neo4j.cluster.com.message.MessageSource
Combines a set of state machines into one. This will
typically receive messages from the network and then delegate
to the correct state machine based on what type of message comes in.
Only one message at a time can be processed.
Constructor Summary |
StateMachines(org.neo4j.cluster.com.message.MessageSource source,
org.neo4j.cluster.com.message.MessageSender sender,
org.neo4j.cluster.timeout.TimeoutStrategy timeoutStrategy,
DelayedDirectExecutor executor,
Executor stateMachineExecutor)
|
StateMachines
public StateMachines(org.neo4j.cluster.com.message.MessageSource source,
org.neo4j.cluster.com.message.MessageSender sender,
org.neo4j.cluster.timeout.TimeoutStrategy timeoutStrategy,
DelayedDirectExecutor executor,
Executor stateMachineExecutor)
getTimeouts
public org.neo4j.cluster.timeout.Timeouts getTimeouts()
addStateMachine
public void addStateMachine(org.neo4j.cluster.statemachine.StateMachine stateMachine)
removeStateMachine
public void removeStateMachine(org.neo4j.cluster.statemachine.StateMachine stateMachine)
getStateMachines
public Iterable<org.neo4j.cluster.statemachine.StateMachine> getStateMachines()
addMessageProcessor
public void addMessageProcessor(org.neo4j.cluster.com.message.MessageProcessor messageProcessor)
- Specified by:
addMessageProcessor
in interface org.neo4j.cluster.com.message.MessageSource
getOutgoing
public org.neo4j.cluster.StateMachines.OutgoingMessageHolder getOutgoing()
process
public boolean process(org.neo4j.cluster.com.message.Message<? extends org.neo4j.cluster.com.message.MessageType> message)
- Specified by:
process
in interface org.neo4j.cluster.com.message.MessageProcessor
addStateTransitionListener
public void addStateTransitionListener(org.neo4j.cluster.statemachine.StateTransitionListener stateTransitionListener)
removeStateTransitionListener
public void removeStateTransitionListener(org.neo4j.cluster.statemachine.StateTransitionListener stateTransitionListener)
toString
public String toString()
- Overrides:
toString
in class Object
getStateMachine
public org.neo4j.cluster.statemachine.StateMachine getStateMachine(Class<? extends org.neo4j.cluster.com.message.MessageType> messageType)
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.