org.jboss.ha.framework.interfaces
Class SubPartitionInfo

java.lang.Object
  extended byorg.jboss.ha.framework.interfaces.SubPartitionInfo
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class SubPartitionInfo
extends java.lang.Object
implements java.lang.Comparable, java.lang.Cloneable, java.io.Serializable

Holder class that knows about a particular HA(sub)Partition i.e. member nodes, partition name and some utility functions.

See Also:
HASessionState (src) , HASessionStateImpl (src) , Serialized Form

Field Summary
 java.util.ArrayList memberNodeNames
          List of nodes part of this sub-partition
 java.util.HashSet subPartitionMergedNames
          When sub-partitions are merged, some names will disappear (eg.
 java.lang.String subPartitionName
          Name of the current sub-partition (will be used to create a JGroups group)
 
Constructor Summary
SubPartitionInfo()
           
SubPartitionInfo(java.lang.String partitionName, java.lang.String[] members)
           
 
Method Summary
 boolean actsForSubPartition(java.lang.String subPartitionName)
           
 java.lang.Object clone()
           
 int compareTo(java.lang.Object o)
          "Note: this class has a natural ordering that is inconsistent with equals."
 boolean containsNode(java.lang.String node)
           
 void merge(SubPartitionInfo (src)  merged)
           
 void setIsNewGroup()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subPartitionName

public java.lang.String subPartitionName
Name of the current sub-partition (will be used to create a JGroups group)


subPartitionMergedNames

public java.util.HashSet subPartitionMergedNames
When sub-partitions are merged, some names will disappear (eg. Merge G1 and G2 in G1) this structure remembers the removed named so that HAPartition can know which new group they should join


memberNodeNames

public java.util.ArrayList memberNodeNames
List of nodes part of this sub-partition

Constructor Detail

SubPartitionInfo

public SubPartitionInfo()

SubPartitionInfo

public SubPartitionInfo(java.lang.String partitionName,
                        java.lang.String[] members)
Method Detail

setIsNewGroup

public void setIsNewGroup()

merge

public void merge(SubPartitionInfo (src)  merged)

toString

public java.lang.String toString()

actsForSubPartition

public boolean actsForSubPartition(java.lang.String subPartitionName)

containsNode

public boolean containsNode(java.lang.String node)

compareTo

public int compareTo(java.lang.Object o)
"Note: this class has a natural ordering that is inconsistent with equals."

Specified by:
compareTo in interface java.lang.Comparable

clone

public java.lang.Object clone()