|
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.WeakConsistencyWrapper
This wrapper class implements a weak consistency protocol for a set of replicas.
The semantics of this protocol is that the readed data can be inconsistent with the other replicas. When a write event occurs, the currently written replicas asks for the consistent state to the valid replica (the owner) and becomes itself the valid replica. This protocol ensures that the set of modifications are finally done in at least one replica.
Field 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 | |
WeakConsistencyWrapper(AspectComponent ac)
|
Method Summary | |
Object |
acceptRemoteWrite(Wrappee wrappee,
RemoteRef remoteReplica,
Object[] data)
The current object is not the owner anymore and returns the object state so that the new owner can be consistent |
Object |
setOwner(RemoteRef newOwner)
This role method sets a new owner. |
Object |
whenWrite(Interaction interaction)
Update the wrappee state with the owner replica state before proceeding the writing method. |
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 WeakConsistencyWrapper(AspectComponent ac)
Method Detail |
public Object whenWrite(Interaction interaction)
The wrappee then becomes the owner.
whenWrite
in class ConsistencyWrapper
ConsistencyWrapper.acceptRemoteWrite(Wrappee,RemoteRef,Object[])
public Object acceptRemoteWrite(Wrappee wrappee, RemoteRef remoteReplica, Object[] data)
acceptRemoteWrite
in class ConsistencyWrapper
remoteReplica
- the replica that is beeing writtendata
- this parameter is not used in this protocol (its
value is null)
ConsistencyWrapper.whenWrite(Interaction)
public Object setOwner(RemoteRef newOwner)
newOwner
- a remote reference on the new owner
|
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 |