|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClusterManager
This is the main interface in the Axis2 clustering implementation. In order to plug-in a new clustering implementation, this interface has to be implemented.
The initilization of a node in the cluster is handled here. It is also responsible for getting
this node to join the cluster. This node should not process any Web services requests until it
successfully joins the cluster. Generally, this node will also need to obtain the state
information and/or configuration information from a neighboring node.
This interface is also responsible for
properly instantiating a ContextManager
& ConfigurationManager
. In the case of
a static
membership scheme,
this members are read from the axis2.xml file and added to the ClusterManager.
In the axis2.xml, the instance of this interface is specified using the "cluster" class attribute.
e.g.
specifies that the TribesClusterManager class is the instance of this interface that
needs to be used.
There can also be several "parameter" elements, which are children of the "cluster" element in the axis2.xml file. Generally, these parameters will be specific to the ClusterManager implementation.
Method Summary | |
---|---|
void |
addLoadBalanceEventHandler(LoadBalanceEventHandler eventHandler,
java.lang.String applicationDomain)
Set the load balance event handler which will be notified when load balance events occur. |
ConfigurationManager |
getConfigurationManager()
|
ContextManager |
getContextManager()
|
java.util.Set<java.lang.String> |
getDomains()
Get all the domains that this ClusterManager belongs to |
LoadBalanceEventHandler |
getLoadBalanceEventHandler(java.lang.String applicationDomain)
Get the LoadBalanceEventHandler which corresponds to the applicationDomain
This will be valid only when this node is running in loadBalance mode |
java.util.List<Member> |
getMembers()
Get the list of members in a static group |
void |
init()
Initialize this node, and join the cluster |
void |
setConfigurationContext(ConfigurationContext configurationContext)
Set the system's configuration context. |
void |
setConfigurationManager(ConfigurationManager configurationManager)
Set the ConfigurationManager corresponding to this ClusterManager. |
void |
setContextManager(ContextManager contextManager)
Set the ContextManager corresponding to this ClusterManager. |
void |
setMembers(java.util.List<Member> members)
Set the static members of the cluster. |
void |
shutdown()
Disconnect this node from the cluster. |
Methods inherited from interface org.apache.axis2.description.ParameterInclude |
---|
addParameter, deserializeParameters, getParameter, getParameters, isParameterLocked, removeParameter |
Method Detail |
---|
void init() throws ClusteringFault
ClusteringFault
- If an error occurs while initializing this node or joining the clusterContextManager getContextManager()
ConfigurationManager getConfigurationManager()
void setContextManager(ContextManager contextManager)
ClusterBuilder
, by
reading the "contextManager" element in the axis2.xml
e.g.
contextManager
- The ContextManager instancevoid setConfigurationManager(ConfigurationManager configurationManager)
ClusterBuilder
, by
reading the "configurationManager" element in the axis2.xml
e.g.
configurationManager
- The ConfigurationManager instancevoid shutdown() throws ClusteringFault
ClusteringFault
- If an error occurs while leaving the clustervoid setConfigurationContext(ConfigurationContext configurationContext)
configurationContext
- The configuration contextvoid setMembers(java.util.List<Member> members)
members
- Members to be addedjava.util.List<Member> getMembers()
void addLoadBalanceEventHandler(LoadBalanceEventHandler eventHandler, java.lang.String applicationDomain)
eventHandler
- The load balance event handlerapplicationDomain
- The application domain which is handled by the eventHandlerLoadBalanceEventHandler getLoadBalanceEventHandler(java.lang.String applicationDomain)
applicationDomain
This will be valid only when this node is running in loadBalance mode
applicationDomain
- The application domain to which the application nodes being
load balanced belong to
applicationDomain
java.util.Set<java.lang.String> getDomains()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |