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

All Known Implementing Classes:
    HAPartitionImpl, ClusterPartition

Nested Class Summary:
public interface  HAPartition.HAPartitionStateTransfer  State management is higly important for clustered services. Consequently, services that wish to manage their state need to subscribe to state transfer events. When their node start, a state is pushed from another node to them. When another node starts, they may be asked to provide such a 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 seperate from the JG protocl handler thread. The ordering of view changes is preserved, but listeners are free to execute cluster calls. 
public interface  HAPartition.HAMembershipExtendedListener   
public interface  HAPartition.AsynchHAMembershipExtendedListener  A tagging interface for HAMembershipExtendedListener callbacks that will be performed in a thread seperate from the JG protocl 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:
callAsynchMethodOnCluster,   callMethodOnCluster,   getClusterNodes,   getCurrentView,   getCurrentViewId,   getDistributedReplicantManager,   getDistributedStateService,   getNodeName,   getPartitionName,   registerMembershipListener,   registerRPCHandler,   subscribeToStateTransferEvents,   unregisterMembershipListener,   unregisterRPCHandler,   unsubscribeFromStateTransferEvents
Method from org.jboss.ha.framework.interfaces.HAPartition Detail:
 public  void callAsynchMethodOnCluster(String serviceName,
    String methodName,
    Object[] args,
    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 that the nodes answer. Thus no answer is available.
 public ArrayList callMethodOnCluster(String serviceName,
    String methodName,
    Object[] args,
    boolean excludeSelf) throws Exception
    Invoke a synchronous RPC call on all nodes of the partition/cluster
 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 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 the current name in the current partition. The name is dynamically determined by the partition.
 public String getPartitionName()
    The name of the partition. Either set when creating the partition (MBEAN definition) or uses the default name
 public  void registerMembershipListener(HAPartition.HAMembershipListener listener)
 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. 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 subscribeToStateTransferEvents(String serviceName,
    HAPartitionStateTransfer subscriber)
    Register a service that will participate in state transfer protocol and receive callbacks
 public  void unregisterMembershipListener(HAPartition.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.