jGCS Documentation

net.sf.jgcs.membership
Interface Membership


public interface Membership

This class defines a Membership.

Version:
1.0
Author:
Nuno Carvalho

Method Summary
 int getCoordinatorRank()
          Gets the rank of the coordinator of this group.
 java.util.List<java.net.SocketAddress> getFailedMembers()
          Gets a list of members that failed since the previous membership.
 java.util.List<java.net.SocketAddress> getJoinedMembers()
          Gets a list of members that joined the group since the previous membership.
 java.util.List<java.net.SocketAddress> getLeavedMembers()
          Gets a list of members that leaved the group since the previous membership.
 int getLocalRank()
          Gets the local rank of the member in this membership.
 java.net.SocketAddress getMemberAddress(int rank)
          Gets the socket address of the member that has the given rank.
 int getMemberRank(java.net.SocketAddress peer)
          Gets the member rank that has the given socket address, or null if there is no matching rank.
 MembershipID getMembershipID()
          Gets the current membership ID.
 java.util.List<java.net.SocketAddress> getMembershipList()
          Gets the current view of the membership.
 

Method Detail

getMembershipList

java.util.List<java.net.SocketAddress> getMembershipList()
Gets the current view of the membership.

Returns:
the current view of the membership.

getMembershipID

MembershipID getMembershipID()
Gets the current membership ID.

Returns:
the current membership ID.

getLocalRank

int getLocalRank()
                 throws NotJoinedException
Gets the local rank of the member in this membership.

Returns:
the local rank of this member.
Throws:
NotJoinedException - if the member is not in a group.

getCoordinatorRank

int getCoordinatorRank()
Gets the rank of the coordinator of this group.

Returns:
the rank of the coordinator of the group.

getMemberRank

int getMemberRank(java.net.SocketAddress peer)
Gets the member rank that has the given socket address, or null if there is no matching rank.

Parameters:
peer - the socket address of the member.
Returns:
the rank of the member.

getMemberAddress

java.net.SocketAddress getMemberAddress(int rank)
Gets the socket address of the member that has the given rank.

Parameters:
rank - the rank of the member.
Returns:
the socket address of the member.

getJoinedMembers

java.util.List<java.net.SocketAddress> getJoinedMembers()
Gets a list of members that joined the group since the previous membership.

Returns:
a list of new members or null if there are none.

getLeavedMembers

java.util.List<java.net.SocketAddress> getLeavedMembers()
Gets a list of members that leaved the group since the previous membership.

Returns:
a list of old members or null if there are none.

getFailedMembers

java.util.List<java.net.SocketAddress> getFailedMembers()
Gets a list of members that failed since the previous membership.

Returns:
a list of failed members or null if there are none.

jGCS Documentation

Copyright (c) 2006, Universidade de Lisboa
For updates and related information please see jGCS home page