|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.aspects.distribution.consistency.Consistency
This class handles any type of consistency protocol on a replicaction group.
A replication group is a set of objects of the same class that are related through a consistency protocol.
Field Summary | |
static String |
ALL_GETTERS
Use to indicate that you need all the getters. |
static String |
ALL_METHODS
Use to indicate that you need all the methods. |
static String |
ALL_MODIFIERS
Use to indicate that you need all the modifiers. |
static int |
KS_ALL
With this knowledge style, all the replicas know all the other replicas (none info is required at construction time). |
static int |
KS_BTREE
With this knowledge style, each replica knows only one replica which is its father in a binary tree (the top of the tree has to be defined at construction time). |
static int |
KS_NEXT
With this knowledge style, each replica knows only one replica which is its neighbour in the replicas list (and last knows the first) (none info is required at construction time). |
static int |
KS_ONE
With this knowledge style, all the replicas know the same unique replica (to be defined at construction time). |
static int |
KS_USER
The knowledge style is defined by the user (the whole knowledge graph has to be defined at construction time). |
Constructor Summary | |
Consistency(Class consistencyWrapperType,
int knowledgeStyle,
int[] knowledgeGraph)
Creates a new consistency. |
Method Summary | |
static void |
bindToDistObj(String name,
Wrappee tobind)
This method binds a new object to the group of replicas of this consistency. |
void |
deploy(RemoteRef[] members,
Class type,
String[] readMethods,
String[] writeMethods,
String[] callMethods)
Deploy the consistency on a set of remote objects. |
protected String[] |
expandMethods(Class type,
String[] methods)
Construct a real methods array with an array that can contain consistency specific strings (like the one that indicates that we need all the modifiers). |
static boolean |
isReplicatedOn(String name,
RemoteContainer container)
Says if a replica is deployed on the given site. |
protected void |
wrapMember(RemoteRef member,
String[] wrappingMethods,
String[][] wrappedMethods,
RemoteRef[] knowledge,
String kstag)
Internally used to wrap a remote member with a consistency wrapper. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int KS_USER
public static int KS_ONE
public static int KS_ALL
public static int KS_NEXT
public static int KS_BTREE
public static String ALL_METHODS
public static String ALL_MODIFIERS
public static String ALL_GETTERS
Constructor Detail |
public Consistency(Class consistencyWrapperType, int knowledgeStyle, int[] knowledgeGraph)
The knowledge style can be one the following:
consistencyWrapperType
- the wrapper type that actually
implements the consistency protocolknowledgeStyle
- can be KS_USER, KS_ONE, KS_ALL, KS_NEXT,
or KS_BTREEknowledgeGraph
- depending on the knowledge style, can be
empty or describing what set of replicas are known by other
replicasMethod Detail |
public static boolean isReplicatedOn(String name, RemoteContainer container)
name
- the name of the replicacontainer
- the remote container to check
protected String[] expandMethods(Class type, String[] methods)
type
- the class to expandmethods
- a set of methods to expand (can contain
ALL_METHODS, ALL_MODIFIERS, and ALL_GETTERS keywords)
public void deploy(RemoteRef[] members, Class type, String[] readMethods, String[] writeMethods, String[] callMethods) throws org.objectweb.jac.aspects.distribution.consistency.WrongConsistencyDefinitionException
PRE: the objects must have been previously deployed.
members
- the references on the replicated memberstype
- the class of these membersreadMethods
- the names of the methods of the type that
read the objects stateswriteMethods
- the names of the methods of the type that
write the objects statescallMethods
- the names of the methods of the type that
neither read or write the objects states
org.objectweb.jac.aspects.distribution.consistency.WrongConsistencyDefinitionException
Deployment.deployStruct(Object[])
,
Deployment.deploy(Object[])
,
Deployment.replicateStruct(Object)
,
Deployment.replicate(Object)
protected void wrapMember(RemoteRef member, String[] wrappingMethods, String[][] wrappedMethods, RemoteRef[] knowledge, String kstag) throws InstantiationException
member
- the member to wrapwrappingMethods
- the methods of the consistency wrapper
that will wrap this memberwrappedMethods
- for each wrapping method, the set of
methods of the member that will be actually wrappedknowledge
- the set of other members known by the newly
wrapped memberkstag
- the knowledge style tag
InstantiationException
public static void bindToDistObj(String name, Wrappee tobind)
name
- the name of the replica to bind totobind
- the object to be put in consistency with the group
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |