| org.jboss.ha.framework.interfaces.HAPartition
All known Subclasses: org.jboss.ha.framework.server.DistributedReplicantManagerImpl, org.jboss.ha.framework.server.HAPartitionImpl, org.jboss.ha.hasessionstate.server.HASessionStateImpl,
HAPartition | public interface HAPartition (Code) | | author: Bill Burke. author: Sacha Labourey. version: $Revision: 57188 $ version: Revisions:
version: 28.07.2002 - Sacha Labourey: version: version: - Added network-partition merge callback for listeners
version:
|
Inner Class :public interface HAPartitionStateTransfer | |
Inner Class :public interface HAMembershipListener | |
Inner Class :public interface AsynchHAMembershipListener extends HAMembershipListener | |
Inner Class :public interface AsynchHAMembershipExtendedListener extends HAMembershipExtendedListener | |
Method Summary | |
public void | callAsynchMethodOnCluster(String serviceName, String methodName, Object[] args, Class[] types, boolean excludeSelf) Invoke a asynchronous RPC call on all nodes of the partition/cluster. | public void | callAsynchMethodOnCluster(String serviceName, String methodName, Object[] args, boolean excludeSelf) | public ArrayList | callMethodOnCluster(String serviceName, String methodName, Object[] args, Class[] types, boolean excludeSelf) | public ArrayList | callMethodOnCluster(String serviceName, String methodName, Object[] args, boolean excludeSelf) | public ArrayList | callMethodOnCoordinatorNode(String serviceName, String methodName, Object[] args, Class[] types, boolean excludeSelf) Calls method on Cluster coordinator node only. | public boolean | getAllowSynchronousMembershipNotifications() Returns whether this partition will synchronously notify any
HAMembershipListeners of membership changes using the calling thread
from the underlying ClusterPartition .
true if registered listeners that don't implementAsynchHAMembershipExtendedListener orAsynchHAMembershipListener will be notifiedsynchronously of membership changes; false ifthose listeners will be notified asynchronously. | public ClusterNode | getClusterNode() Return member node for the current cluster node. | public ClusterNode[] | getClusterNodes() Return the member nodes that built the current view i.e. | public Vector | getCurrentView() Return the list of member nodes that built the current view i.e. | public long | getCurrentViewId() Each time the partition topology changes, a new view is computed. | public DistributedReplicantManager | getDistributedReplicantManager() Accessor to the DRM that is linked to this partition. | public DistributedState | getDistributedStateService() Accessor the the DistributedState (DS) that is linked to this partition. | public String | getNodeName() Return the name of this node in the current partition. | public String | getPartitionName() The name of the partition. | public void | registerMembershipListener(HAMembershipListener listener) Subscribes to receive
HAMembershipListener events. | public void | registerRPCHandler(String serviceName, Object handler) The partition receives RPC calls from other nodes in the cluster and demultiplex
them, according to a service name, to a particular service. | public void | setAllowSynchronousMembershipNotifications(boolean allowSync) Sets whether this partition will synchronously notify any
HAMembershipListeners of membership changes using the calling thread
from the underlying ClusterPartition .
Parameters: allowSync - true if registered listeners that don't implement AsynchHAMembershipExtendedListener orAsynchHAMembershipListener should be notifiedsynchronously of membership changes; false ifthose listeners can be notified asynchronously. | public void | subscribeToStateTransferEvents(String serviceName, HAPartition.HAPartitionStateTransfer subscriber) Register a service that will participate in state transfer protocol and receive callbacks
Parameters: serviceName - Name of the service that subscribes for state stransfer events. | public void | unregisterMembershipListener(HAMembershipListener listener) Unsubscribes from receiving
HAMembershipListener events. | public void | unregisterRPCHandler(String serviceName, Object subscriber) | public void | unsubscribeFromStateTransferEvents(String serviceName, HAPartition.HAPartitionStateTransfer subscriber) Unregister a service from state transfer callbacks. |
callAsynchMethodOnCluster | public void callAsynchMethodOnCluster(String serviceName, String methodName, Object[] args, Class[] types, boolean excludeSelf) throws Exception(Code) | | Invoke a asynchronous RPC call on all nodes of the partition/cluster. The
call will return immediately and will not wait that the nodes answer. Thus
no answer is available.
Parameters: serviceName - Name of the target service name on which calls are de-multiplexed Parameters: methodName - name of the Java method to be called on remote services Parameters: args - array of Java Object representing the set of parameters to begiven to the remote method Parameters: types - The types of the parameters Parameters: excludeSelf - indicates if the RPC must also be made on the currentnode of the partition or only on remote nodes throws: Exception - Throws if a communication exception occurs |
callMethodOnCluster | public ArrayList callMethodOnCluster(String serviceName, String methodName, Object[] args, Class[] types, boolean excludeSelf) throws Exception(Code) | | Invoke a synchronous RPC call on all nodes of the partition/cluster
Parameters: serviceName - Name of the target service name on which calls are de-multiplexed Parameters: methodName - name of the Java method to be called on remote services Parameters: args - array of Java Object representing the set of parameters to begiven to the remote method Parameters: types - The types of the parameters Parameters: excludeSelf - indicates if the RPC must also be made on the currentnode of the partition or only on remote nodes throws: Exception - Throws if a communication exception occurs an array of answers from remote nodes |
callMethodOnCoordinatorNode | public ArrayList callMethodOnCoordinatorNode(String serviceName, String methodName, Object[] args, Class[] types, boolean excludeSelf) throws Exception(Code) | | Calls method on Cluster coordinator node only. The cluster coordinator node is the first node to join the
cluster or the first node in the current cluster view.
Parameters: serviceName - Name of the target service name on which calls are de-multiplexed Parameters: methodName - name of the Java method to be called on remote services Parameters: args - array of Java Object representing the set of parameters to begiven to the remote method Parameters: types - The types of the parametersnode of the partition or only on remote nodes Parameters: excludeSelf - indicates if the RPC will be made on the current node even if the current nodeis the coordinator throws: Exception - Throws if a communication exception occurs an array of answers from remote nodes |
getAllowSynchronousMembershipNotifications | public boolean getAllowSynchronousMembershipNotifications()(Code) | | Returns whether this partition will synchronously notify any
HAMembershipListeners of membership changes using the calling thread
from the underlying ClusterPartition .
true if registered listeners that don't implementAsynchHAMembershipExtendedListener orAsynchHAMembershipListener will be notifiedsynchronously of membership changes; false ifthose listeners will be notified asynchronously. Defaultis false . |
getClusterNode | public ClusterNode getClusterNode()(Code) | | Return member node for the current cluster node.
ClusterNode containing the current node name |
getClusterNodes | public ClusterNode[] getClusterNodes()(Code) | | Return the member nodes that built the current view i.e. the current partition.
An array of ClusterNode listing the current members of the partitionn.This array will be in the same order in all nodes in the cluster thathave received the current view. |
getCurrentView | public Vector getCurrentView()(Code) | | Return the list of member nodes that built the current view i.e. the current partition.
An array of Strings containing the node names |
getCurrentViewId | public long getCurrentViewId()(Code) | | Each time the partition topology changes, a new view is computed. A view is a list of members,
the first member being the coordinator of the view. Each view also has a distinct identifier.
The identifier of the current view |
getDistributedReplicantManager | public DistributedReplicantManager getDistributedReplicantManager()(Code) | | Accessor to the DRM that is linked to this partition.
the DRM linked to this partition |
getDistributedStateService | public DistributedState getDistributedStateService()(Code) | | Accessor the the DistributedState (DS) that is linked to this partition.
the DistributedState service |
getNodeName | public String getNodeName()(Code) | | Return the name of this node in the current partition. The name is
dynamically determined by the partition. The name will be the String
returned by getClusterNode().getName() .
The node name See Also: HAPartition.getClusterNode() |
getPartitionName | public String getPartitionName()(Code) | | The name of the partition. Either set when creating the partition
(MBEAN definition) or uses the default name
Name of the current partition |
registerMembershipListener | public void registerMembershipListener(HAMembershipListener listener)(Code) | | Subscribes to receive
HAMembershipListener events.
Parameters: listener - The membership listener object |
registerRPCHandler | public void registerRPCHandler(String serviceName, Object handler)(Code) | | The partition receives RPC calls from other nodes in the cluster and demultiplex
them, according to a service name, to a particular service. Consequently, each
service must first subscribe with a particular service name in the partition. The subscriber
does not need to implement any specific interface: the call is handled
dynamically through reflection.
Parameters: serviceName - Name of the subscribing service (demultiplexing key) Parameters: handler - object to be called when receiving a RPC for its key. |
setAllowSynchronousMembershipNotifications | public void setAllowSynchronousMembershipNotifications(boolean allowSync)(Code) | | Sets whether this partition will synchronously notify any
HAMembershipListeners of membership changes using the calling thread
from the underlying ClusterPartition .
Parameters: allowSync - true if registered listeners that don't implement AsynchHAMembershipExtendedListener orAsynchHAMembershipListener should be notifiedsynchronously of membership changes; false ifthose listeners can be notified asynchronously. Defaultis false . |
subscribeToStateTransferEvents | public void subscribeToStateTransferEvents(String serviceName, HAPartition.HAPartitionStateTransfer subscriber)(Code) | | Register a service that will participate in state transfer protocol and receive callbacks
Parameters: serviceName - Name of the service that subscribes for state stransfer events. This name must be identical for all identical services in the cluster. Parameters: subscriber - Object implementing HAPartitionStateTransfer and providing or receiving state transfer callbacks |
unregisterMembershipListener | public void unregisterMembershipListener(HAMembershipListener listener)(Code) | | Unsubscribes from receiving
HAMembershipListener events.
Parameters: listener - The listener wishing to unsubscribe |
unregisterRPCHandler | public void unregisterRPCHandler(String serviceName, Object subscriber)(Code) | | Unregister the service from the partition
Parameters: serviceName - Name of the service key (on which the demultiplexing occurs) Parameters: subscriber - The target object that unsubscribes |
unsubscribeFromStateTransferEvents | public void unsubscribeFromStateTransferEvents(String serviceName, HAPartition.HAPartitionStateTransfer subscriber)(Code) | | Unregister a service from state transfer callbacks.
Parameters: serviceName - Name of the service that participates in the state transfer protocol Parameters: subscriber - Service implementing the state transfer callback methods |
|
|