Save This Page
Home » JBoss-5.1.0 » org.jboss.ha.framework » interfaces » [javadoc | source]
org.jboss.ha.framework.interfaces
public interface: HAPartition [javadoc | source]

All Known Implementing Classes:
    HAPartitionImpl, ClusterPartition

HAPartition is an abstraction of the communication framework, providing access to clustered services such as Distributed State, Distributed Replicant Manager and RPC.
Nested Class Summary:
public interface  HAPartition.HAPartitionStateTransfer  State management is highly important for clustered services. Consequently, services that wish to manage their state need to subscribe to state transfer events. When a service is started on a cluster node, state is pushed from another node to the new node. When another node starts, the node may be asked to provide its state to initialise the newly started node. 
public interface  HAPartition.HAMembershipListener  When a new node joins the cluster or an existing node leaves the cluster (or simply dies), membership events are raised. 
public interface  HAPartition.AsynchHAMembershipListener  A tagging interface for HAMembershipListener callbacks that will be performed in a thread separate from the JG protocol handler thread. The ordering of view changes is preserved, but listeners are free to execute cluster calls. 
public interface  HAPartition.HAMembershipExtendedListener  Extends HAMembershipListener to receive notification when a network-partition merge occurs. 
public interface  HAPartition.AsynchHAMembershipExtendedListener  A tagging interface for HAMembershipExtendedListener callbacks that will be performed in a thread separate from the JG protocol handler thread. The ordering of view changes is preserved, but listeners are free to execute cluster calls. 
Method from org.jboss.ha.framework.interfaces.HAPartition Summary:
callAsyncMethodOnNode,   callAsynchMethodOnCluster,   callMethodOnCluster,   callMethodOnCluster,   callMethodOnCoordinatorNode,   callMethodOnNode,   getAllowSynchronousMembershipNotifications,   getClusterNode,   getClusterNodes,   getCurrentView,   getCurrentViewId,   getDistributedReplicantManager,   getDistributedStateService,   getNodeName,   getPartitionName,   registerMembershipListener,   registerRPCHandler,   registerRPCHandler,   setAllowSynchronousMembershipNotifications,   subscribeToStateTransferEvents,   unregisterMembershipListener,   unregisterRPCHandler,   unsubscribeFromStateTransferEvents
Method from org.jboss.ha.framework.interfaces.HAPartition Detail:
 public  void callAsyncMethodOnNode(String serviceName,
    String methodName,
    Object[] args,
    Class[] types,
    long methodTimeout,
    ClusterNode targetNode) throws Throwable
    Calls method on target node only.
 public  void callAsynchMethodOnCluster(String serviceName,
    String methodName,
    Object[] args,
    Class[] types,
    boolean excludeSelf) throws Exception
    Invoke a asynchronous RPC call on all nodes of the partition/cluster. The call will return immediately and will not wait for the nodes to answer. Thus no answer is available.
 public ArrayList callMethodOnCluster(String serviceName,
    String methodName,
    Object[] args,
    Class[] types,
    boolean excludeSelf) throws Exception
    Invoke a synchronous RPC call on all nodes of the partition/cluster
 public ArrayList callMethodOnCluster(String serviceName,
    String methodName,
    Object[] args,
    Class[] types,
    boolean excludeSelf,
    ResponseFilter filter) throws Exception
    Invoke a synchronous RPC call on all nodes of the partition/cluster which can be terminated early based on response filter implementation passed.
 public ArrayList callMethodOnCoordinatorNode(String serviceName,
    String methodName,
    Object[] args,
    Class[] types,
    boolean excludeSelf) throws Exception
    Calls method on Cluster coordinator node only. The cluster coordinator node is the first node in the current cluster view.
 public Object callMethodOnNode(String serviceName,
    String methodName,
    Object[] args,
    Class[] types,
    long methodTimeout,
    ClusterNode targetNode) throws Throwable
    Calls method synchronously on target 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.
 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., the current partition.
 public Vector getCurrentView()
    Return the list of member nodes that built the current view i.e., the current partition.
 public long getCurrentViewId()
    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.
 public DistributedReplicantManager getDistributedReplicantManager()
    Accessor to the DistributedReplicantManager (DRM) that is linked to this partition.
 public DistributedState getDistributedStateService()Deprecated! Use -  JBoss Cache for distributed caching

    Accessor to the DistributedState (DS) that is linked to this partition.
 public String getNodeName()
    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().
 public String getPartitionName()
    The name of the partition. Either set when creating the partition (MBEAN definition) or uses the default name
 public  void registerMembershipListener(HAMembershipListener listener)
 public  void registerRPCHandler(String serviceName,
    Object handler)
    The partition receives RPC calls from other nodes in the cluster and demultiplexes 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.
 public  void registerRPCHandler(String serviceName,
    Object handler,
    ClassLoader classloader)
    The partition receives RPC calls from other nodes in the cluster and demultiplexes 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. In cases where the client is using a scoped classloader, the client will need to provide a reference to the classloader if the service's RPC calls use custom parameter or response object types. The classloader will be used to deserialize the RPC and/or response.
 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.
 public  void subscribeToStateTransferEvents(String serviceName,
    HAPartitionStateTransfer subscriber)
    Register a service that will participate in state transfer protocol and receive callbacks
 public  void unregisterMembershipListener(HAMembershipListener listener)
 public  void unregisterRPCHandler(String serviceName,
    Object subscriber)
    Unregister the service from the partition
 public  void unsubscribeFromStateTransferEvents(String serviceName,
    HAPartitionStateTransfer subscriber)
    Unregister a service from state transfer callbacks.