|
|||||||||||
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.StrongPullConsistencyWrapper
This wrapper class implements the core protocol for a strong consistency that is based on a pull strategy.
On contrary to the StrongPushConsistencyWrapper
,
this protocol pulls the data from the other replicas. Indeed, each
time a data is read and is not locally available, it is fetched
from the known replicas.
StrongPushConsistencyWrapper
,
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, cr |
Constructor Summary | |
StrongPullConsistencyWrapper(AspectComponent ac)
An empty constructor for the Consistency class. |
|
StrongPullConsistencyWrapper(AspectComponent ac,
String hosts)
A friendly constructor for a pull consistency wrapper. |
Method Summary | |
Object |
acceptRemoteRead(Wrappee wrappee,
RemoteRef remoteReplica,
Object[] data)
Try to read the method asked by whenRead . |
Object |
whenRead(Interaction interaction)
This wrapping method first try to use the wrappee to get the result of the read method. |
Methods inherited from class org.objectweb.jac.aspects.distribution.consistency.ConsistencyWrapper |
acceptRemoteCall, acceptRemoteWrite, addKnownReplica, addMember, construct, expandMethods, getConsistencyWrapperType, getKnownReplicas, getVisitedReplicas, invalidateTopology, invoke, setCallMethods, setKnownReplicas, setReadMethods, setWriteMethods, toString, whenBindingNewReplica, whenCall, whenNewReplicaBounded, whenWrite, wrap |
Methods inherited from class org.objectweb.jac.core.Wrapper |
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StrongPullConsistencyWrapper(AspectComponent ac, String hosts)
hosts
- a regular expression that defines the host where
the consistency protocol is installedpublic StrongPullConsistencyWrapper(AspectComponent ac)
Method Detail |
public Object whenRead(Interaction interaction)
If this result is null or if an exception occurs, it considers that the read information was not locally present and tries to fetch it from the replicas it knows (recursivelly all the replicas are finally asked). If none of the replica returns a value, it returns null or throws an exception.
whenRead
in class ConsistencyWrapper
ConsistencyWrapper.acceptRemoteRead(Wrappee,RemoteRef,Object[])
public Object acceptRemoteRead(Wrappee wrappee, RemoteRef remoteReplica, Object[] data)
whenRead
.The data is :
data[0] = the read method name string data[1] = an array that contains the arguments of the read method
acceptRemoteRead
in class ConsistencyWrapper
remoteReplica
- the replica that received the read eventdata
- the read event data
data[0]
methodConsistencyWrapper.whenRead(Interaction)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |