|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axis2.clustering.state.DefaultStateManager
public class DefaultStateManager
This class is the defaut StateManager of the Apache Tribes based clustering implementation
| Constructor Summary | |
|---|---|
DefaultStateManager()
|
|
| Method Summary | |
|---|---|
void |
addParameter(Parameter param)
Method addParameter. |
void |
deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
|
Parameter |
getParameter(String name)
Method getParameter. |
ArrayList |
getParameters()
Gets all the parameters in a given description. |
Map |
getReplicationExcludePatterns()
Get all the excluded context property name patterns |
boolean |
isContextClusterable(AbstractContext context)
This is a check to see whether the properties in an instance of AbstractContext
should be replicated. |
boolean |
isParameterLocked(String parameterName)
Checks whether the parameter is locked at any level. |
void |
removeContext(AbstractContext context)
This method is called when AbstractContext is removed from the system |
void |
removeParameter(Parameter param)
|
void |
replicateState(StateClusteringCommand command)
Replicate state using a custom StateClusteringCommand |
void |
setConfigurationContext(ConfigurationContext configurationContext)
Set the system's configuration context. |
void |
setReplicationExcludePatterns(String contextType,
List patterns)
All properties in the context with type contextType which have
names that match the specified pattern will be excluded from replication. |
void |
setSender(ChannelSender sender)
|
void |
updateContext(AbstractContext context)
This method is called when properties in an AbstractContext are updated. |
void |
updateContext(AbstractContext context,
String[] propertyNames)
This method is called when one need to update/replicate only certains properties in the specified context |
void |
updateContexts(AbstractContext[] contexts)
This method is called when properties in a collection of AbstractContexts are updated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultStateManager()
| Method Detail |
|---|
public void setSender(ChannelSender sender)
public void updateContext(AbstractContext context)
throws ClusteringFault
StateManagerAbstractContext are updated.
This could be addition of new properties, modifications of existing properties or
removal of properties.
updateContext in interface StateManagercontext - The context to be replicated
ClusteringFault - If replication fails
public void updateContext(AbstractContext context,
String[] propertyNames)
throws ClusteringFault
StateManagercontext
updateContext in interface StateManagercontext - The AbstractContext containing the properties to be replicatedpropertyNames - The names of the specific properties that should be replicated
ClusteringFault - If replication fails
public void updateContexts(AbstractContext[] contexts)
throws ClusteringFault
StateManagerAbstractContexts are updated.
This could be addition of new properties, modifications of existing properties or
removal of properties.
updateContexts in interface StateManagercontexts - The AbstractContexts containing the properties to be replicated
ClusteringFault - If replication fails
public void replicateState(StateClusteringCommand command)
throws ClusteringFault
StateManager
replicateState in interface StateManagercommand - The custom StateClusteringCommand which can be used for replicating state
ClusteringFault - If replication fails
public void removeContext(AbstractContext context)
throws ClusteringFault
StateManagerAbstractContext is removed from the system
removeContext in interface StateManagercontext - The AbstractContext to be removed
ClusteringFault - If context removal failspublic boolean isContextClusterable(AbstractContext context)
StateManagerAbstractContext
should be replicated. This allows an implementer to dissallow the replication of properties
stored in a certain type of context
isContextClusterable in interface StateManagercontext - The instance of AbstractContext under consideration
AbstractContext is clusterablepublic void setConfigurationContext(ConfigurationContext configurationContext)
StateManager
setConfigurationContext in interface StateManagerconfigurationContext - The configuration context
public void setReplicationExcludePatterns(String contextType,
List patterns)
StateManager
All properties in the context with type contextType which have
names that match the specified pattern will be excluded from replication.
Only prefixes and suffixes are allowed. e.g. the local_* pattern indicates that all property names starting with local_ should be omitted from replication. *_local pattern indicated that all property names ending with _local should be omitted from replication. * pattern indicates that all properties should be excluded.
Generally, we can use the context class name as the context type.
setReplicationExcludePatterns in interface StateManagercontextType - The type of the context such as
org.apache.axis2.context.ConfigurationContext,
org.apache.axis2.context.ServiceGroupContext &
org.apache.axis2.context.ServiceContext.
Also "defaults" is a special type, which will apply to all contextspatterns - The patternspublic Map getReplicationExcludePatterns()
StateManager
getReplicationExcludePatterns in interface StateManagercontextType. See StateManager.setReplicationExcludePatterns(String,List).
The values are of type List of String Objects,
which are a collection of patterns to be excluded.StateManager.setReplicationExcludePatterns(String, java.util.List)
public void addParameter(Parameter param)
throws AxisFault
ParameterInclude
addParameter in interface ParameterIncludeAxisFault
public void removeParameter(Parameter param)
throws AxisFault
removeParameter in interface ParameterIncludeAxisFaultpublic Parameter getParameter(String name)
ParameterInclude
getParameter in interface ParameterIncludepublic ArrayList getParameters()
ParameterInclude
getParameters in interface ParameterIncludepublic boolean isParameterLocked(String parameterName)
ParameterInclude
isParameterLocked in interface ParameterInclude
public void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
throws AxisFault
deserializeParameters in interface ParameterIncludeAxisFault
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||