org.objectweb.jac.aspects.distribution
Class ConsistencyAC

java.lang.Object
  |
  +--org.objectweb.jac.core.AspectComponent
        |
        +--org.objectweb.jac.aspects.distribution.ConsistencyAC
All Implemented Interfaces:
BaseProgramListener, Serializable

public class ConsistencyAC
extends AspectComponent

This aspect component provides some consistency protocols that can be settled on a set of replicas.

Author:
Renaud Pawlak
See Also:
ConsistencyConf, Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jac.core.AspectComponent
application, blockKeywords, cr, currentConfigMethod, currentImports, firstCall, NOT_SHARED, SHARED, startWeavingCCount, startWeavingCount, startWeavingMethod, startWeavingType, systemListener, wrappers
 
Fields inherited from interface org.objectweb.jac.core.BaseProgramListener
FOUND_OBJECT
 
Constructor Summary
ConsistencyAC()
           
 
Method Summary
 void addStrongPullConsistency(String wrappeeName, String methods, String hosts)
          Adds a strong-pull consistency protocol on a set of replicas called wrappeeName.
 void addStrongPushConsistency(String wrappeeName, String methods, String hosts)
          Adds a strong-push consistency protocol on a set of replicas called wrappeeName.
 
Methods inherited from class org.objectweb.jac.core.AspectComponent
addWrapper, afterApplicationStarted, afterRunningWrapper, afterWrap, afterWrappeeInit, attr, attrdef, beforeConfiguration, beforeReload, beforeRunningWrapper, beforeWrappeeInit, configure, defines, defineTimer, doRegister, doUnregister, error, getAC, getApplication, getBlockKeywords, getConfigurationMethods, getConfigurationMethodsName, getConfigurationMethodsName, getDefaultConfigs, getName, getNameCounters, getWrappers, init, isConfigurationMethod, isSystemListener, onExit, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, setApplication, setAttribute, setAttribute, setAttribute, setSystemListener, simulateUsingNewInstance, unweave, unwrapAll, updateNameCounters, warning, weave, whenClone, whenCloseDisplay, whenConfigured, whenDeleted, whenDeserialized, whenFree, whenGetObjects, whenNameObject, whenObjectMiss, whenReload, whenRemoteInstantiation, whenSerialized, whenTopologyChanged, whenUsingNewClass, whenUsingNewInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsistencyAC

public ConsistencyAC()
Method Detail

addStrongPushConsistency

public void addStrongPushConsistency(String wrappeeName,
                                     String methods,
                                     String hosts)
Adds a strong-push consistency protocol on a set of replicas called wrappeeName.

The classical use of this consistency protocol is that any replica forwards all the writing calls to all the replicas located on the hosts defined by the consistency.

It is called "push" since the replica 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 protocols.

Parameters:
wrappeeName - the name of the object to be consistent
methods - a pointcut expression that defines the methods that will be pushed to the other replicas (generally the state modifiers -- use the MODIFIERS keyword in your expression)
hosts - the location of the replicas as a pointcut expression

addStrongPullConsistency

public void addStrongPullConsistency(String wrappeeName,
                                     String methods,
                                     String hosts)
Adds a strong-pull consistency protocol on a set of replicas called wrappeeName.

On contrary to the push consistency, 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.

Parameters:
wrappeeName - the name of the object to be consistent
methods - a pointcut expression that defines the methods that will be pulled from the other replicas (generally the state readers -- use the keyword ACCESSORS in your expression)
hosts - the location of the replicas as a pointcut expression