com.newstep.solid.replication
public abstract class Replicant
Author:
dpetroni
Abstract.
Links:
Kernel Association Association Link
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Kernel Association Association Link
Associates type:
aggregation
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Directed.
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Custom properties
link:
aggregation
| Nested Class Summary |
protected class |
|
| Field Summary |
|
|
|
|
long |
|
String |
|
long |
|
private HashMap |
|
final static String |
|
private HashMap |
|
private boolean |
|
final static Logger |
|
private long |
|
private int |
|
protected ConcurrentHashMap |
|
|
|
|
|
private long |
|
private String |
|
| Constructor Summary |
protected void |
|
| Method Summary |
protected final void |
|
protected final void |
activate(Long clientReplicantId, Integer capsuleId) |
protected final void |
|
protected final void |
|
protected abstract void |
|
protected void |
|
public void |
|
protected void |
|
public long |
|
|
|
|
|
public long |
|
public String |
|
protected final void |
|
protected abstract void |
|
protected final void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
protected final void |
|
private HashMap activeClients
Multiplicity:
1
Custom properties
associates:
com.newstep.replication.Replicated
final static String className
Final.
Multiplicity:
1
Static.
private HashMap clients
Multiplicity:
1
Custom properties
associates:
com.newstep.solid.test.replication.Capsule
private boolean immediateActivation
Multiplicity:
1
final static Logger logger
Final.
Multiplicity:
1
Static.
long replicantId
private long replicantId
Multiplicity:
1
private int replicatedId
Multiplicity:
1
protected ConcurrentHashMap replicatedObjects
Multiplicity:
1
Multiplicity:
1
Multiplicity:
1
private long serverReplicantId
Multiplicity:
1
long serverReplicantId
private String serviceName
Multiplicity:
1
String serviceName
protected void Replicant ()
Stereotype:
create
protected final void activate (Long clientReplicantId)
Activate all replicated objects originating from the remote replicant
idenfied by its id. This is invoked when the remote replicant fails and
this replicant is instructed to take over
Parameters:
clientReplicantId
Final.
protected final void activate (Long clientReplicantId, Integer capsuleId)
Activate a single replicated object
Parameters:
clientReplicantId
capsuleId
Final.
Final.
protected final void addClient (Long clientReplicantId)
Final.
protected abstract void addReplicatedObject (Replicated obj)
Abstract.
protected void clearDirtyBacklog ()
protected void dirtyContents ()
public long getReplicantId ()
IMPORTANT: replicant ids are longs consisting of the replicator id in the
upper 32 bits and a unique integer in the lower 32 bits
Return:
Returns the replicantId.
public long getServerReplicantId ()
public String getServiceName ()
Get the unique name of the service this replicant provides. This name is
used when advertising or requesting for replication
Return:
Returns the serviceName.
protected final void removeActive (Replicated obj)
Final.
protected abstract void removeReplicatedObject (Replicated obj)
Abstract.
protected final void replicate (Replicated source)
Parameters:
source
Final.
public void setReplicantId (Long id)
IMPORTANT: replicant ids are longs consisting of the replicator id in the
upper 32 bits and a unique integer in the lower 32 bits
This operation is ment to be invoked only from the Replicator. Only
replicator can determine the proper id for the replicant
Parameters:
id
public void setServerReplicantId (Long serverReplicantId)
public void setServiceName (String serviceName)
Set the unique name of the service this replicant provides. This name
will be used when advertising or requesting for replication
Parameters:
serviceName
The serviceName to set.
protected final void update (Capsule newState)
Parameters:
newState
Final.