|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdarx.ReplicationGroupInfo
public class ReplicationGroupInfo
This object contains the information concerning a specific replication group handled by DARX. It provides the leader of the replication group, as well as the list of all the members.
Constructor Summary | |
---|---|
ReplicationGroupInfo()
Constructs an empty information container. |
|
ReplicationGroupInfo(java.lang.String task_id,
int leader_id,
java.util.Hashtable member_list)
Constructs an information container. |
Method Summary | |
---|---|
void |
addLeader(ReplicantInfo new_leader)
|
void |
addMember(ReplicantInfo new_member)
|
boolean |
contains(ReplicantInfo rep_info)
Checks whether the given replicant info belongs to the group. |
void |
displayReplicants()
Displays the DARX path of every replicant in the group. |
ReplicantInfo |
getLeaderInfo()
|
ReplicantInfo |
getLocatedMemberInfo(java.lang.String url,
int port_nb)
Returns information about a replica at a specific location. |
java.util.Enumeration |
getMembers()
|
int |
getSize()
|
java.lang.String |
getTaskName()
|
void |
removeMember(ReplicantInfo doomed_member)
Removes a member from the replication group information. |
ReplicantInfo |
selectNewLeader()
Selects a new leader within the current replication group. |
void |
setLeader(int new_leader_id)
|
void |
setLeader(ReplicantInfo new_leader)
|
void |
setTaskName(java.lang.String new_task_name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReplicationGroupInfo()
public ReplicationGroupInfo(java.lang.String task_id, int leader_id, java.util.Hashtable member_list)
Method Detail |
---|
public java.lang.String getTaskName()
public boolean contains(ReplicantInfo rep_info)
public ReplicantInfo getLeaderInfo() throws NoMoreReplicantsException
NoMoreReplicantsException
public ReplicantInfo getLocatedMemberInfo(java.lang.String url, int port_nb) throws UnknownReplicantException
UnknownReplicantException
public java.util.Enumeration getMembers()
public int getSize()
public void setTaskName(java.lang.String new_task_name)
public void setLeader(int new_leader_id)
public void setLeader(ReplicantInfo new_leader) throws UnknownReplicantException
UnknownReplicantException
public void addMember(ReplicantInfo new_member)
public void addLeader(ReplicantInfo new_leader)
public void removeMember(ReplicantInfo doomed_member) throws IllegalLeaderRemovalException, NoMoreReplicantsException
doomed_member
- the info regarding the removed replica
IllegalLeaderRemovalException
NoMoreReplicantsException
public ReplicantInfo selectNewLeader() throws NoMoreReplicantsException
NoMoreReplicantsException
public void displayReplicants()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |