|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Revisions:
2001/10/31: marcf
2002/08/23: Sacha Labourey
Nested Class Summary | |
static interface |
DistributedReplicantManager.ReplicantListener
When a particular key in the DistributedReplicantManager table gets modified, all listeners will be notified of replicant changes for that key. |
Method Summary | |
void |
add(String key,
Serializable replicant)
Add a replicant, it will be attached to this cluster node |
Collection |
getAllServices()
Return a list of all services that have a least one replicant. |
int |
getReplicantsViewId(String key)
Returns an id corresponding to the current view of this set of replicants. |
boolean |
isMasterReplica(String key)
Indicates if the current node is the master replica for this given key. |
Serializable |
lookupLocalReplicant(String key)
Lookup the replicant attached to this cluster node |
List |
lookupReplicants(String key)
Return a list of all replicants. |
List |
lookupReplicantsNodeNames(String key)
Return a list of all replicants node names. |
void |
registerListener(String key,
DistributedReplicantManager.ReplicantListener subscriber)
Subscribe a new listener DistributedReplicantManager.ReplicantListener for replicants change |
void |
remove(String key)
Remove the entire key from the ReplicationService |
void |
unregisterListener(String key,
DistributedReplicantManager.ReplicantListener subscriber)
Unsubscribe a listener DistributedReplicantManager.ReplicantListener that had subscribed for replicants changes |
Method Detail |
public void registerListener(String key, DistributedReplicantManager.ReplicantListener subscriber)
DistributedReplicantManager.ReplicantListener
for replicants change
key
- Name of the replicant, must be identical cluster-wide for all identical replicantssubscriber
- The subsribing DistributedReplicantManager.ReplicantListener
public void unregisterListener(String key, DistributedReplicantManager.ReplicantListener subscriber)
DistributedReplicantManager.ReplicantListener
that had subscribed for replicants changes
key
- Name of the replicant, must be identical cluster-wide for all identical replicantssubscriber
- The unsubscribing DistributedReplicantManager.ReplicantListener
public void add(String key, Serializable replicant) throws Exception
key
- Replicant name. All replicas around the cluster must use the same key name.replicant
- Local data of the replicant, that is, any serializable data
Exception
- Thrown if a cluster communication problem occurspublic void remove(String key) throws Exception
key
- Name of the replicant
Exception
- Thrown if a cluster communication problem occurspublic Serializable lookupLocalReplicant(String key)
key
- The name of the replicant
public List lookupReplicants(String key)
key
- The replicant name
public List lookupReplicantsNodeNames(String key)
key
- The replicant name
public Collection getAllServices()
public int getReplicantsViewId(String key)
key
- The replicant name
public boolean isMasterReplica(String key)
key
- The replicant name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |