|
||||||||||
| PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Nested Class Summary | |
static interface |
DistributedReplicantManager.ReplicantListener (src)
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(java.lang.String key,
java.io.Serializable replicant)
Add a replicant, it will be attached to this cluster node |
java.util.Collection |
getAllServices()
Return a list of all services that have a least one replicant. |
int |
getReplicantsViewId(java.lang.String key)
Returns an id corresponding to the current view of this set of replicants. |
boolean |
isMasterReplica(java.lang.String key)
Indicates if the current node is the master replica for this given key. |
java.io.Serializable |
lookupLocalReplicant(java.lang.String key)
Lookup the replicant attached to this cluster node |
java.util.List |
lookupReplicants(java.lang.String key)
Return a list of all replicants. |
java.util.List |
lookupReplicantsNodeNames(java.lang.String key)
Return a list of all replicants node names. |
void |
registerListener(java.lang.String key,
DistributedReplicantManager.ReplicantListener (src) subscriber)
Subscribe a new listener DistributedReplicantManager.ReplicantListener (src) for replicants change |
void |
remove(java.lang.String key)
Remove the entire key from the ReplicationService |
void |
unregisterListener(java.lang.String key,
DistributedReplicantManager.ReplicantListener (src) subscriber)
Unsubscribe a listener DistributedReplicantManager.ReplicantListener (src) that had subscribed for replicants changes |
| Method Detail |
public void registerListener(java.lang.String key,
DistributedReplicantManager.ReplicantListener (src) subscriber)
DistributedReplicantManager.ReplicantListener (src) for replicants change
key - Name of the replicant, must be identical cluster-wide for all identical replicantssubscriber - The subsribing DistributedReplicantManager.ReplicantListener (src)
public void unregisterListener(java.lang.String key,
DistributedReplicantManager.ReplicantListener (src) subscriber)
DistributedReplicantManager.ReplicantListener (src) that had subscribed for replicants changes
key - Name of the replicant, must be identical cluster-wide for all identical replicantssubscriber - The unsubscribing DistributedReplicantManager.ReplicantListener (src)
public void add(java.lang.String key,
java.io.Serializable replicant)
throws java.lang.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
java.lang.Exception - Thrown if a cluster communication problem occurs
public void remove(java.lang.String key)
throws java.lang.Exception
key - Name of the replicant
java.lang.Exception - Thrown if a cluster communication problem occurspublic java.io.Serializable lookupLocalReplicant(java.lang.String key)
key - The name of the replicant
public java.util.List lookupReplicants(java.lang.String key)
key - The replicant name
public java.util.List lookupReplicantsNodeNames(java.lang.String key)
key - The replicant name
public java.util.Collection getAllServices()
public int getReplicantsViewId(java.lang.String key)
key - The replicant name
public boolean isMasterReplica(java.lang.String key)
key - The replicant name
|
||||||||||
| PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||