|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HAPartition
Revisions:
28.07.2002 - Sacha Labourey:
| Nested Class Summary | |
|---|---|
static interface |
HAPartition.AsynchHAMembershipExtendedListener
A tagging interface for HAMembershipExtendedListener callbacks that will be performed in a thread seperate from the JG protocl handler thread. |
static interface |
HAPartition.AsynchHAMembershipListener
A tagging interface for HAMembershipListener callbacks that will be performed in a thread seperate from the JG protocl handler thread. |
static interface |
HAPartition.HAMembershipExtendedListener
|
static interface |
HAPartition.HAMembershipListener
When a new node joins the cluster or an existing node leaves the cluster (or simply dies), membership events are raised. |
static interface |
HAPartition.HAPartitionStateTransfer
State management is higly important for clustered services. |
| Method Summary | |
|---|---|
void |
callAsynchMethodOnCluster(String serviceName,
String methodName,
Object[] args,
boolean excludeSelf)
Deprecated. Use callAsynchMethodOnCluster(String, String, Object[], Class[], boolean) instead |
void |
callAsynchMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class[] types,
boolean excludeSelf)
Invoke a asynchronous RPC call on all nodes of the partition/cluster. |
ArrayList |
callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
boolean excludeSelf)
Deprecated. Use callMethodOnCluster(String, String, Object[], Class[], boolean) instead |
ArrayList |
callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class[] types,
boolean excludeSelf)
Invoke a synchronous RPC call on all nodes of the partition/cluster |
ArrayList |
callMethodOnCoordinatorNode(String serviceName,
String methodName,
Object[] args,
Class[] types,
boolean excludeSelf)
Calls method on Cluster coordinator node only. |
boolean |
getAllowSynchronousMembershipNotifications()
Returns whether this partition will synchronously notify any HAMembershipListeners of membership changes using the calling thread from the underlying ClusterPartition. |
ClusterNode |
getClusterNode()
Return member node for the current cluster node. |
ClusterNode[] |
getClusterNodes()
Return the member nodes that built the current view i.e. |
Vector |
getCurrentView()
Return the list of member nodes that built the current view i.e. |
long |
getCurrentViewId()
Each time the partition topology changes, a new view is computed. |
DistributedReplicantManager |
getDistributedReplicantManager()
Accessor to the DRM that is linked to this partition. |
DistributedState |
getDistributedStateService()
Accessor the the DistributedState (DS) that is linked to this partition. |
String |
getNodeName()
Return the name of this node in the current partition. |
String |
getPartitionName()
The name of the partition. |
void |
registerMembershipListener(HAPartition.HAMembershipListener listener)
Subscribes to receive HAPartition.HAMembershipListener events. |
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. |
void |
setAllowSynchronousMembershipNotifications(boolean allowSync)
Sets whether this partition will synchronously notify any HAMembershipListeners of membership changes using the calling thread from the underlying ClusterPartition. |
void |
subscribeToStateTransferEvents(String serviceName,
HAPartition.HAPartitionStateTransfer subscriber)
Register a service that will participate in state transfer protocol and receive callbacks |
void |
unregisterMembershipListener(HAPartition.HAMembershipListener listener)
Unsubscribes from receiving HAPartition.HAMembershipListener events. |
void |
unregisterRPCHandler(String serviceName,
Object subscriber)
Unregister the service from the partition |
void |
unsubscribeFromStateTransferEvents(String serviceName,
HAPartition.HAPartitionStateTransfer subscriber)
Unregister a service from state transfer callbacks. |
| Method Detail |
|---|
String getNodeName()
getClusterNode().getName().
getClusterNode()String getPartitionName()
DistributedReplicantManager getDistributedReplicantManager()
DistributedState getDistributedStateService()
void registerRPCHandler(String serviceName,
Object handler)
serviceName - Name of the subscribing service (demultiplexing key)handler - object to be called when receiving a RPC for its key.
void unregisterRPCHandler(String serviceName,
Object subscriber)
serviceName - Name of the service key (on which the demultiplexing occurs)subscriber - The target object that unsubscribes
ArrayList callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class[] types,
boolean excludeSelf)
throws Exception
serviceName - Name of the target service name on which calls are de-multiplexedmethodName - name of the Java method to be called on remote servicesargs - array of Java Object representing the set of parameters to be
given to the remote methodtypes - The types of the parametersexcludeSelf - indicates if the RPC must also be made on the current
node of the partition or only on remote nodes
Exception - Throws if a communication exception occurs
ArrayList callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
boolean excludeSelf)
throws Exception
callMethodOnCluster(String, String, Object[], Class[], boolean) instead
serviceName - methodName - args - excludeSelf -
Exception
void callAsynchMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class[] types,
boolean excludeSelf)
throws Exception
serviceName - Name of the target service name on which calls are de-multiplexedmethodName - name of the Java method to be called on remote servicesargs - array of Java Object representing the set of parameters to be
given to the remote methodtypes - The types of the parametersexcludeSelf - indicates if the RPC must also be made on the current
node of the partition or only on remote nodes
Exception - Throws if a communication exception occurs
void callAsynchMethodOnCluster(String serviceName,
String methodName,
Object[] args,
boolean excludeSelf)
throws Exception
callAsynchMethodOnCluster(String, String, Object[], Class[], boolean) instead
serviceName - methodName - args - excludeSelf -
Exception
ArrayList callMethodOnCoordinatorNode(String serviceName,
String methodName,
Object[] args,
Class[] types,
boolean excludeSelf)
throws Exception
serviceName - Name of the target service name on which calls are de-multiplexedmethodName - name of the Java method to be called on remote servicesargs - array of Java Object representing the set of parameters to be
given to the remote methodtypes - The types of the parameters
node of the partition or only on remote nodesexcludeSelf - indicates if the RPC will be made on the current node even if the current node
is the coordinator
Exception - Throws if a communication exception occurs
void subscribeToStateTransferEvents(String serviceName,
HAPartition.HAPartitionStateTransfer subscriber)
serviceName - Name of the service that subscribes for state stransfer events. This name must be identical for all identical services in the cluster.subscriber - Object implementing HAPartition.HAPartitionStateTransfer and providing or receiving state transfer callbacks
void unsubscribeFromStateTransferEvents(String serviceName,
HAPartition.HAPartitionStateTransfer subscriber)
serviceName - Name of the service that participates in the state transfer protocolsubscriber - Service implementing the state transfer callback methodsvoid registerMembershipListener(HAPartition.HAMembershipListener listener)
HAPartition.HAMembershipListener events.
listener - The membership listener objectvoid unregisterMembershipListener(HAPartition.HAMembershipListener listener)
HAPartition.HAMembershipListener events.
listener - The listener wishing to unsubscribeboolean getAllowSynchronousMembershipNotifications()
ClusterPartition.
true if registered listeners that don't implement
AsynchHAMembershipExtendedListener or
AsynchHAMembershipListener will be notified
synchronously of membership changes; false if
those listeners will be notified asynchronously. Default
is false.void setAllowSynchronousMembershipNotifications(boolean allowSync)
ClusterPartition.
allowSync - true if registered listeners that don't
implement AsynchHAMembershipExtendedListener or
AsynchHAMembershipListener should be notified
synchronously of membership changes; false if
those listeners can be notified asynchronously. Default
is false.long getCurrentViewId()
Vector getCurrentView()
ClusterNode[] getClusterNodes()
ClusterNode getClusterNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||