org.jboss.ha.framework.server
Class ClusterNodeImpl

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

public class ClusterNodeImpl
extends Object
implements org.jboss.ha.framework.interfaces.ClusterNode

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: 85945 $
Author:
Sacha Labourey., Brian Stansberry, Galder Zamarreno
See Also:
ClusterPartitionMBean, Serialized Form

Field Summary
protected  String id
           
protected  String jgId
           
protected  org.jgroups.stack.IpAddress originalJGAddress
           
 
Constructor Summary
ClusterNodeImpl(org.jgroups.stack.IpAddress jgAddress)
           
 
Method Summary
 int compareTo(Object o)
           
protected  String createJGName()
           
 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 final String id

jgId

protected String jgId

originalJGAddress

protected final org.jgroups.stack.IpAddress originalJGAddress
Constructor Detail

ClusterNodeImpl

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

getName

public String getName()
Specified by:
getName in interface org.jboss.ha.framework.interfaces.ClusterNode

getJGName

public String getJGName()

getOriginalJGAddress

public org.jgroups.stack.IpAddress getOriginalJGAddress()

getIpAddress

public InetAddress getIpAddress()
Specified by:
getIpAddress in interface org.jboss.ha.framework.interfaces.ClusterNode

getPort

public int getPort()
Specified by:
getPort in interface org.jboss.ha.framework.interfaces.ClusterNode

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)

createJGName

protected String createJGName()


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.