org.codehaus.activecluster.impl
Class NodeImpl
java.lang.Object
org.codehaus.activecluster.impl.NodeImpl
- All Implemented Interfaces:
- Node, Serializable
- Direct Known Subclasses:
- NonReplicatedLocalNode, ReplicatedLocalNode
- public class NodeImpl
- extends Object
- implements Node
Default implementation of a remote Node
- Version:
- $Revision: 1.6 $
- See Also:
- Serialized Form
state
protected Map state
coordinator
protected boolean coordinator
NodeImpl
public NodeImpl(Node node)
- Allow a node to be copied for sending it as a message
- Parameters:
node
-
NodeImpl
public NodeImpl(Destination destination)
NodeImpl
public NodeImpl(Destination destination,
Map state)
getName
public String getName()
- Specified by:
getName
in interface Node
- Returns:
- the name of the node
toString
public String toString()
getDestination
public Destination getDestination()
- Description copied from interface:
Node
- Access to the queue to send messages direct to this node.
- Specified by:
getDestination
in interface Node
- Returns:
- the destination to send messages to this node while its available
getState
public Map getState()
- Specified by:
getState
in interface Node
- Returns:
- an immutable map of the nodes state
setState
protected void setState(Map state)
isCoordinator
public boolean isCoordinator()
- Specified by:
isCoordinator
in interface Node
- Returns:
- true if this node has been elected as coordinator
setCoordinator
protected void setCoordinator(boolean value)
Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.