gcsImplementations.spreadGcs
Class SpreadGcsMembershipInfo

java.lang.Object
  extended by gcs.GcsMembershipInfo
      extended by gcsImplementations.spreadGcs.SpreadGcsMembershipInfo

public class SpreadGcsMembershipInfo
extends GcsMembershipInfo

Spread back-end implementation of the GcsMembershipInfo.

Author:
tkob
See Also:
GcsMembershipInfo

Nested Class Summary
 class SpreadGcsMembershipInfo.SpreadGcsVirtualSynchronySet
           
 
Nested classes/interfaces inherited from class gcs.GcsMembershipInfo
GcsMembershipInfo.GcsVirtualSynchronySet
 
Constructor Summary
SpreadGcsMembershipInfo()
           
 
Method Summary
 GcsGroup getDisconnected()
          Returns the private group of the disconnected client if the message is caused by disconnection.
 GcsGroup getGroup()
          Returns object representing the group which caused this message to be sent.
 GcsGroupID getGroupID()
          Returns the GcsGroupID object representing the group which caused this message to be sent.
 GcsGroup getJoined()
          Returns the private group of the client who joined the GcsMembershipInfo.getGroup() group.
 GcsGroup getLeft()
          Returns the private group of the client who left the GcsMembershipInfo.getGroup() group.
 GcsGroup[] getMembers()
          Returns an array of GcsGroup objects representing all private groups that are currently members of the GcsMembershipInfo.getGroup() group.
 GcsMembershipInfo.GcsVirtualSynchronySet getMyVirtualSynchronySet()
           
 GcsGroup[] getStayed()
          Deprecated, provided for convenience.
 GcsMembershipInfo.GcsVirtualSynchronySet[] getVirtualSynchronySets()
           
 boolean isCausedByDisconnect()
          Returns true if a member of GcsMembershipInfo.getGroup() group disconnected.
 boolean isCausedByJoin()
          Returns true if there is a new member of GcsMembershipInfo.getGroup() group.
 boolean isCausedByLeave()
          Returns true if a member of GcsMembershipInfo.getGroup() group left the group.
 boolean isCausedByNetwork()
          Returns true if this message is caused by a network partition.
 boolean isRegularMembership()
          Returns true if this message is a regular membership message.
 boolean isSelfLeave()
          Returns true if this message is caused by leaving the GcsMembershipInfo.getGroup() group.
 boolean isTransition()
          Returns true if this is a transition message.
 org.jdom.Element toXml()
          Returns a XML representation of the GcsMembershipInfo message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpreadGcsMembershipInfo

public SpreadGcsMembershipInfo()
Method Detail

getDisconnected

public GcsGroup getDisconnected()
Description copied from class: GcsMembershipInfo
Returns the private group of the disconnected client if the message is caused by disconnection.

Specified by:
getDisconnected in class GcsMembershipInfo
Returns:
the private group of the disconnected client

getGroup

public GcsGroup getGroup()
Description copied from class: GcsMembershipInfo
Returns object representing the group which caused this message to be sent.

Specified by:
getGroup in class GcsMembershipInfo
Returns:
the object representing the group which caused this message to be sent

getGroupID

public GcsGroupID getGroupID()
Description copied from class: GcsMembershipInfo
Returns the GcsGroupID object representing the group which caused this message to be sent. It applies to a moment in time when the group membership view changed.

Specified by:
getGroupID in class GcsMembershipInfo
Returns:
if the GcsMembershipInfo.isRegularMembership() is true GcsGroupID associated with group which caused this message to be sent, false otherwise

getJoined

public GcsGroup getJoined()
Description copied from class: GcsMembershipInfo
Returns the private group of the client who joined the GcsMembershipInfo.getGroup() group.

Specified by:
getJoined in class GcsMembershipInfo
Returns:
the private group of the client who joined the GcsMembershipInfo.getGroup() group if both GcsMembershipInfo.isRegularMembership() and GcsMembershipInfo.isCausedByJoin() are true, null otherwise

getLeft

public GcsGroup getLeft()
Description copied from class: GcsMembershipInfo
Returns the private group of the client who left the GcsMembershipInfo.getGroup() group.

Specified by:
getLeft in class GcsMembershipInfo
Returns:
the private group of the client who left the GcsMembershipInfo.getGroup() group if both GcsMembershipInfo.isRegularMembership() and GcsMembershipInfo.isCausedByJoin() are true, null otherwise

getMembers

public GcsGroup[] getMembers()
Description copied from class: GcsMembershipInfo
Returns an array of GcsGroup objects representing all private groups that are currently members of the GcsMembershipInfo.getGroup() group.

Specified by:
getMembers in class GcsMembershipInfo
Returns:
all private groups that are currently part of the GcsMembershipInfo.getGroup() group if GcsMembershipInfo.isRegularMembership() is true, null otherwise

getMyVirtualSynchronySet

public GcsMembershipInfo.GcsVirtualSynchronySet getMyVirtualSynchronySet()
Specified by:
getMyVirtualSynchronySet in class GcsMembershipInfo

getStayed

public GcsGroup[] getStayed()
Description copied from class: GcsMembershipInfo
Deprecated, provided for convenience. Returns an array of GcsGroups objects representing private groups of the members who were now partitioned.

Specified by:
getStayed in class GcsMembershipInfo
Returns:
private groups of members who are now partitioned if GcsMembershipInfo.isRegularMembership() and GcsMembershipInfo.isCausedByNetwork() are true, null otherwise

getVirtualSynchronySets

public GcsMembershipInfo.GcsVirtualSynchronySet[] getVirtualSynchronySets()
Specified by:
getVirtualSynchronySets in class GcsMembershipInfo

isCausedByDisconnect

public boolean isCausedByDisconnect()
Description copied from class: GcsMembershipInfo
Returns true if a member of GcsMembershipInfo.getGroup() group disconnected. His private group can be retrieved by calling GcsMembershipInfo.getDisconnected().

Specified by:
isCausedByDisconnect in class GcsMembershipInfo
Returns:
true if this message is caused by disconnection of a member of GcsMembershipInfo.getGroup() group, false otherwise

isCausedByJoin

public boolean isCausedByJoin()
Description copied from class: GcsMembershipInfo
Returns true if there is a new member of GcsMembershipInfo.getGroup() group. His private group can be retrieved by calling GcsMembershipInfo.getJoined().

Specified by:
isCausedByJoin in class GcsMembershipInfo
Returns:
true if there is a new member of GcsMembershipInfo.getGroup() group, false otherwise

isCausedByLeave

public boolean isCausedByLeave()
Description copied from class: GcsMembershipInfo
Returns true if a member of GcsMembershipInfo.getGroup() group left the group. His private group can be retrieved by calling GcsMembershipInfo.getLeft().

Specified by:
isCausedByLeave in class GcsMembershipInfo
Returns:
true if a member of GcsMembershipInfo.getGroup() group left the group

isCausedByNetwork

public boolean isCausedByNetwork()
Description copied from class: GcsMembershipInfo
Returns true if this message is caused by a network partition. List of members who are still in the group can be retrieved by calling GcsMembershipInfo.getStayed().

Specified by:
isCausedByNetwork in class GcsMembershipInfo
Returns:
true if this message is caused by a network partition, false otherwise

isRegularMembership

public boolean isRegularMembership()
Description copied from class: GcsMembershipInfo
Returns true if this message is a regular membership message.

Specified by:
isRegularMembership in class GcsMembershipInfo
Returns:
true if this message is a regular membership message, false otherwise

isSelfLeave

public boolean isSelfLeave()
Description copied from class: GcsMembershipInfo
Returns true if this message is caused by leaving the GcsMembershipInfo.getGroup() group.

Specified by:
isSelfLeave in class GcsMembershipInfo
Returns:
true if this message is caused by leaving the GcsMembershipInfo.getGroup() group, false otherwise

isTransition

public boolean isTransition()
Description copied from class: GcsMembershipInfo
Returns true if this is a transition message.

Specified by:
isTransition in class GcsMembershipInfo
Returns:
true if this is a transition message, false otherwise

toXml

public org.jdom.Element toXml()
Description copied from class: GcsMembershipInfo
Returns a XML representation of the GcsMembershipInfo message.

Specified by:
toXml in class GcsMembershipInfo
Returns:
a XML representation of the GcsMembershipInfo message