|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClusteringAgent
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 StateManager
&
NodeManager
. In the case of
a static
membership scheme,
this members are read from the axis2.xml file and added to the ClusteringAgent.
In the axis2.xml, the instance of this interface is specified using the "clustering"
class attribute.
e.g.
specifies that the TribesClusterAgent class is the instance of this interface that
needs to be used.
There can also be several "parameter" elements, which are children of the "clustering" element in the axis2.xml file. Generally, these parameters will be specific to the ClusteringAgent implementation.
Method Summary | |
---|---|
void |
addGroupManagementAgent(GroupManagementAgent agent,
String applicationDomain)
Set the load balance event handler which will be notified when load balance events occur. |
void |
finalize()
Do cleanup & leave the cluster |
Set<String> |
getDomains()
Get all the domains that this ClusteringAgent belongs to |
GroupManagementAgent |
getGroupManagementAgent(String applicationDomain)
Get the LoadBalanceEventHandler which corresponds to the applicationDomain
This will be valid only when this node is running in loadBalance mode |
List<Member> |
getMembers()
Get the list of members in a static group |
NodeManager |
getNodeManager()
|
StateManager |
getStateManager()
|
void |
init()
Initialize this node, and join the cluster |
List<ClusteringCommand> |
sendMessage(ClusteringMessage msg,
boolean isRpcMessage)
Send a message to all members in this member's primary cluster |
void |
setConfigurationContext(ConfigurationContext configurationContext)
Set the system's configuration context. |
void |
setMembers(List<Member> members)
Set the static members of the cluster. |
void |
setNodeManager(NodeManager nodeManager)
Set the NodeManager corresponding to this ClusteringAgent. |
void |
setStateManager(StateManager stateManager)
Set the StateManager corresponding to this ClusteringAgent. |
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 clustervoid finalize()
StateManager getStateManager()
NodeManager getNodeManager()
void setStateManager(StateManager stateManager)
ClusterBuilder
, by
reading the "contextManager" element in the axis2.xml
e.g.
stateManager
- The StateManager instancevoid setNodeManager(NodeManager nodeManager)
ClusterBuilder
, by
reading the "configurationManager" element in the axis2.xml
e.g.
nodeManager
- The NodeManager instancevoid shutdown() throws ClusteringFault
ClusteringFault
- If an error occurs while leaving the clustervoid setConfigurationContext(ConfigurationContext configurationContext)
configurationContext
- The configuration contextvoid setMembers(List<Member> members)
members
- Members to be addedList<Member> getMembers()
void addGroupManagementAgent(GroupManagementAgent agent, String applicationDomain)
agent
- The load balance event handlerapplicationDomain
- The application domain which is handled by the eventHandlerGroupManagementAgent getGroupManagementAgent(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
Set<String> getDomains()
List<ClusteringCommand> sendMessage(ClusteringMessage msg, boolean isRpcMessage) throws ClusteringFault
msg
- The message to be sentisRpcMessage
- Indicates whether the message has to be sent in RPC mode
ClusteringFault
- If an error occurs while sending the message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |