com.sun.sgs.management
Class NodeInfo

java.lang.Object
  extended by com.sun.sgs.management.NodeInfo
All Implemented Interfaces:
Serializable

public class NodeInfo
extends Object
implements Serializable

Management information about a single node.

See Also:
Serialized Form

Constructor Summary
NodeInfo(String host, long id, Node.Health health, long backup, int jmxPort)
          Creates a NodeInfo object.
 
Method Summary
 long getBackup()
          Returns the node id of the backup node for this node, or -1 if no backup is assigned.
 Node.Health getHealth()
          Returns the node health.
 String getHost()
          Returns the host name the node is running on.
 long getId()
          Returns the unique node identifier, which is assigned internally.
 int getJmxPort()
          Returns the port JMX is listening on for remote connections, or -1 if only local JMX connections are allowed.
 boolean isLive()
          Returns whether the node is alive or failed.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeInfo

@ConstructorProperties(value={"host","id","health","backup","jmxPort"})
public NodeInfo(String host,
                                           long id,
                                           Node.Health health,
                                           long backup,
                                           int jmxPort)
Creates a NodeInfo object.

Parameters:
host - the host name of the machine
id - the unique identifier for this node
health - the node's health
backup - the backup node for this node
jmxPort - the port for JMX remote connections
Method Detail

getHost

public String getHost()
Returns the host name the node is running on.

Returns:
host name of the machine the node is running on

getId

public long getId()
Returns the unique node identifier, which is assigned internally.

Returns:
the unique node identifier

getHealth

public Node.Health getHealth()
Returns the node health.

Returns:
the node health

isLive

public boolean isLive()
Returns whether the node is alive or failed. Once a node has failed, it is never considered alive again and is removed from the system when any required fail-over procedures have completed.

Returns:
true if the node is alive

getBackup

public long getBackup()
Returns the node id of the backup node for this node, or -1 if no backup is assigned.

Returns:
the node id of the backup node, or -1 if no backup is assigned.

getJmxPort

public int getJmxPort()
Returns the port JMX is listening on for remote connections, or -1 if only local JMX connections are allowed.

Returns:
the port JMX is listening on for remote connections, or -1 if only local JMX connections are allowed

toString

public String toString()

Overrides:
toString in class Object

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved