Methods Summary |
---|
public boolean | actsForSubPartition(java.lang.String subPartitionName)
return (subPartitionName.equals (subPartitionName) || subPartitionMergedNames.contains (subPartitionName));
|
public java.lang.Object | clone()
SubPartitionInfo clonedObject = new SubPartitionInfo ();
clonedObject.subPartitionName = this.subPartitionName;
clonedObject.memberNodeNames = (ArrayList)this.memberNodeNames.clone ();
clonedObject.subPartitionMergedNames = (HashSet)this.subPartitionMergedNames.clone ();
return clonedObject;
|
public int | compareTo(java.lang.Object o)"Note: this class has a natural ordering that is
inconsistent with equals."
int mySize = memberNodeNames.size ();
int itsSize = ((SubPartitionInfo)o).memberNodeNames.size ();
if (mySize==itsSize)
return 0;
else if (mySize > itsSize)
return 1;
else
return -1;
|
public boolean | containsNode(java.lang.String node)
return memberNodeNames.contains (node);
|
public void | merge(org.jboss.ha.framework.interfaces.SubPartitionInfo merged)
this.memberNodeNames.addAll (merged.memberNodeNames);
if (this.newGroup && !merged.newGroup)
this.subPartitionName = merged.subPartitionName;
else if (!merged.newGroup)
this.subPartitionMergedNames.add (merged.subPartitionName);
if (!merged.newGroup)
this.subPartitionMergedNames.add (merged.subPartitionName);
this.subPartitionMergedNames.addAll (merged.subPartitionMergedNames); // ? needed ?
merged.memberNodeNames.clear ();
merged.subPartitionMergedNames.clear ();
|
public void | setIsNewGroup()
this.newGroup = true;
|
public java.lang.String | toString()
return subPartitionName + ":[" + memberNodeNames + "] aka '" + subPartitionMergedNames + "'";
|