|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.core.Wrapper | +--org.objectweb.jac.aspects.distribution.consistency.ConsistencyWrapper | +--org.objectweb.jac.aspects.distribution.consistency.StrongPushConsistencyWrapper
This wrapper implements a consistency protocol that forwards all the writing calls to all the replicas that are known by the wrapper.
It is called "push" since the wrapper pushes the data to the other replicas. Despite this strategy is the most curently used, other strong or weak consistency strategies can be implemented by other consistency wrappers.
whenWrite(Interaction)
,
StrongPullConsistencyWrapper
,
WeakConsistencyWrapper
,
Serialized FormField Summary |
Fields inherited from class org.objectweb.jac.aspects.distribution.consistency.ConsistencyWrapper |
ALL_GETTERS, ALL_METHODS, ALL_MODIFIERS, knownReplicas, visitedReplicas |
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac |
Constructor Summary | |
StrongPushConsistencyWrapper(AspectComponent ac)
An empty constructor for the Consistency class. |
|
StrongPushConsistencyWrapper(AspectComponent ac,
String hosts)
A friendly constructor for a push consistency wrapper. |
Method Summary | |
Object |
acceptRemoteWrite(Wrappee wrappee,
RemoteRef remoteReplica,
Object[] data)
This method is called by whenWrite to push the
needed data when a state is writen in a remote replica. |
void |
whenBindingNewReplica(Wrappee wrappee,
RemoteRef newReplica)
Push the current replica state to the binding new replica. |
Object |
whenWrite(Interaction interaction)
Forwards the call to all the replicas and then call the replica. |
Methods inherited from class org.objectweb.jac.aspects.distribution.consistency.ConsistencyWrapper |
acceptRemoteCall, acceptRemoteRead, addKnownReplica, addMember, expandMethods, getConsistencyWrapperType, getKnownReplicas, getVisitedReplicas, invalidateTopology, setCallMethods, setKnownReplicas, setReadMethods, setWriteMethods, toString, whenBindingNewReplica, whenCall, whenNewReplicaBounded, whenRead, wrap |
Methods inherited from class org.objectweb.jac.core.Wrapper |
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StrongPushConsistencyWrapper(AspectComponent ac, String hosts)
hosts
- a regular expression that defines the host where
the consistency protocol is installedpublic StrongPushConsistencyWrapper(AspectComponent ac)
Method Detail |
public Object whenWrite(Interaction interaction)
The pushing mecanism is stopped by using the collaboration
attribute value defined by visitedReplicas
.
whenWrite
in class ConsistencyWrapper
ConsistencyWrapper.getVisitedReplicas()
public Object acceptRemoteWrite(Wrappee wrappee, RemoteRef remoteReplica, Object[] data)
whenWrite
to push the
needed data when a state is writen in a remote replica.
The data is :
data[0] = the write method name string data[1] = an array that contains the arguments of the write method
acceptRemoteWrite
in class ConsistencyWrapper
remoteReplica
- expected to be a reference on the remote
replica that recieved the write eventdata
- the data transmittedd by whenWrite
whenWrite(Interaction)
public void whenBindingNewReplica(Wrappee wrappee, RemoteRef newReplica)
newReplica
- the replica that is currently binding
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |