org.jboss.ha.framework.interfaces
Class ClusterNode

java.lang.Object
  extended by org.jboss.ha.framework.interfaces.ClusterNode
All Implemented Interfaces:
Serializable, Cloneable, Comparable

public class ClusterNode
extends Object
implements Comparable, Cloneable, Serializable

Replacement for a JG IpAddress that doesn't base its representation on the JG address but on the computed node name added to the IPAddress instead. This is to avoid any problem in the cluster as some nodes may interpret a node name differently (IP resolution, name case, FQDN or host name, etc.)

Version:
$Revision: 1.5.6.3 $

Revisions:

August 17 2003 Sacha Labourey:

Author:
Sacha Labourey.
See Also:
ClusterPartition, Serialized Form

Field Summary
protected  String id
           
protected  String jgId
           
protected  org.jgroups.stack.IpAddress originalJGAddress
           
 
Constructor Summary
ClusterNode()
           
ClusterNode(org.jgroups.stack.IpAddress jgAddress)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object obj)
           
 InetAddress getIpAddress()
           
 String getJGName()
           
 String getName()
           
 org.jgroups.stack.IpAddress getOriginalJGAddress()
           
 int getPort()
           
protected  String getShortName(String hostname)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected String id

jgId

protected String jgId

originalJGAddress

protected org.jgroups.stack.IpAddress originalJGAddress
Constructor Detail

ClusterNode

public ClusterNode()

ClusterNode

public ClusterNode(org.jgroups.stack.IpAddress jgAddress)
Method Detail

getName

public String getName()

getJGName

public String getJGName()

getOriginalJGAddress

public org.jgroups.stack.IpAddress getOriginalJGAddress()

getIpAddress

public InetAddress getIpAddress()

getPort

public int getPort()

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getShortName

protected String getShortName(String hostname)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.