public interface GroupRpcDispatcher extends GroupCommunicationService
Modifier and Type | Method and Description |
---|---|
void |
callAsynchMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf)
Invoke an RPC call on all nodes of the partition/cluster without waiting for any responses.
|
void |
callAsynchMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf,
boolean unordered)
Invoke an RPC call on all nodes of the partition/cluster without waiting for any responses.
|
void |
callAsyncMethodOnCoordinatorNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf)
Calls method on Cluster coordinator node only.
|
void |
callAsyncMethodOnCoordinatorNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf,
boolean unordered)
Calls method on Cluster coordinator node only.
|
void |
callAsyncMethodOnNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
ClusterNode targetNode)
Calls method on target node only.
|
void |
callAsyncMethodOnNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
ClusterNode targetNode,
boolean unordered)
Calls method on target node only.
|
<T> List<T> |
callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf)
Invoke an RPC call on all nodes of the partition/cluster and return their response values as a list.
|
<T> List<T> |
callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf,
ResponseFilter filter)
Invoke a synchronous RPC call on all nodes of the partition/cluster and return their response values as a list.
|
<T> List<T> |
callMethodOnCluster(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf,
ResponseFilter filter,
long methodTimeout,
boolean unordered)
Invoke an RPC call on all nodes of the partition/cluster and return their response values as a list.
|
<T> T |
callMethodOnCoordinatorNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf)
Calls method on Cluster coordinator node only.
|
<T> T |
callMethodOnCoordinatorNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
boolean excludeSelf,
long methodTimeout,
boolean unordered)
Calls method on Cluster coordinator node only.
|
<T> T |
callMethodOnNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
ClusterNode targetNode)
Calls method on target node only.
|
<T> T |
callMethodOnNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
long methodTimeout,
ClusterNode targetNode)
Calls method on target node only.
|
<T> T |
callMethodOnNode(String serviceName,
String methodName,
Object[] args,
Class<?>[] types,
long methodTimeout,
ClusterNode targetNode,
boolean unordered)
Calls method synchronously on target node only.
|
long |
getMethodCallTimeout()
Gets the default period, in ms, that the various
callMethodOnXXX methods that don't specify a
methodTimeout parameter will wait for a response. |
void |
registerRPCHandler(String serviceName,
Object handler)
Register an object upon which RPCs associated with the given serviceName will be invoked.
|
void |
registerRPCHandler(String serviceName,
Object handler,
ClassLoader classLoader)
Deprecated.
|
void |
registerRPCHandler(String serviceName,
Object handler,
org.jboss.marshalling.ClassResolver resolver)
Register an object upon which RPCs associated with the given serviceName will be invoked.
|
void |
unregisterRPCHandler(String serviceName,
Object subscriber)
Unregister the service from the partition
|
getClusterNode, getClusterNodes, getCurrentViewId, getGroupName, getNodeName, isConsistentWith, isCoordinator
long getMethodCallTimeout()
callMethodOnXXX
methods that don't specify a
methodTimeout
parameter will wait for a response.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.@Deprecated void registerRPCHandler(String serviceName, Object handler, ClassLoader classLoader)
registerRPCHandler(String, Object, ClassResolver)
instead.serviceName
- Name of the subscribing service (demultiplexing key)handler
- object to be called when receiving a RPC for its key.classloader
- ClassLoader to be used when marshalling and unmarshalling RPC requests and responses.void registerRPCHandler(String serviceName, Object handler, org.jboss.marshalling.ClassResolver resolver)
serviceName
- Name of the subscribing service (demultiplexing key)handler
- object to be called when receiving a RPC for its key.resolver
- ClassResolver to be used when marshalling and unmarshalling RPC requests and responses.void unregisterRPCHandler(String serviceName, Object subscriber)
serviceName
- Name of the service key (on which the demultiplexing occurs)subscriber
- The target object that unsubscribes<T> List<T> callMethodOnCluster(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf) throws InterruptedException
callMethodOnCluster(String, String, Object[], Class[], boolean, ResponseFilter, long, boolean)
callAsynchMethodOnCluster(serviceName, methodName, args, types, Object.class, excludeSelf, null, methodTimeout, false)}
where methodTimeout
is the value returned by getMethodCallTimeout()
.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- false
if the RPC must also be made on the current node of the partition,
true
if only on remote nodesInterruptedException
<T> List<T> callMethodOnCluster(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf, ResponseFilter filter) throws InterruptedException
callMethodOnCluster(String, String, Object[], Class[], boolean, ResponseFilter, long, boolean)
callAsynchMethodOnCluster(serviceName, methodName, args, types, Object.class, excludeSelf, filter, methodTimeout, false)}
where methodTimeout
is the value returned by getMethodCallTimeout()
.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- false
if the RPC must also be made on the current node of the partition,
true
if only on remote nodesfilter
- response filter instance which allows for early termination of the synchronous RPC call. Can be
null
.InterruptedException
<T> List<T> callMethodOnCluster(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf, ResponseFilter filter, long methodTimeout, boolean unordered) throws InterruptedException
T
- the expected type of the return valuesserviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- false
if the RPC must also be made on the current node of the partition,
true
if only on remote nodesfilter
- response filter instance which allows for early termination of the RPC call once acceptable responses are
received. Can be null
, in which the call will not return until all nodes have responded.methodTimeout
- max number of ms to wait for response to arrive before returningunordered
- true
if the HAPartition isn't required to ensure that this RPC is invoked on all nodes in a
consistent order with respect to other RPCs originated by the same nodeInterruptedException
void callAsynchMethodOnCluster(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf) throws InterruptedException
callAsynchMethodOnCluster(serviceName, methodName, args, types, excludeSelf, false)
.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- false
if the RPC must also be made on the current node of the partition,
true
if only on remote nodesInterruptedException
void callAsynchMethodOnCluster(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf, boolean unordered) throws InterruptedException
serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- false
if the RPC must also be made on the current node of the partition,
true
if only on remote nodesunordered
- true
if the HAPartition isn't required to ensure that this RPC is invoked on all nodes in a
consistent order with respect to other RPCs originated by the same nodeInterruptedException
<T> T callMethodOnCoordinatorNode(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf) throws Exception
callMethodOnCoordinatorNode(String, String, Object[], Class[], boolean, long, boolean)
callMethodOnCoordinatorNode(serviceName, methodName, args, types, Object.class, excludeSelf, methodTimeout, false)} where
methodTimeout
is the value returned by getMethodCallTimeout()
.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- true
if the RPC should not be made on the current node even if the current node is the
coordinatorException
<T> T callMethodOnCoordinatorNode(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf, long methodTimeout, boolean unordered) throws Exception
T
- the expected type of the return valueserviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- true
if the RPC should not be made on the current node even if the current node is the
coordinatormethodTimeout
- max number of ms to wait for response to arrive before returningunordered
- true
if the HAPartition isn't required to ensure that this RPC is invoked on all nodes in a
consistent order with respect to other RPCs originated by the same nodeException
<T> T callMethodOnNode(String serviceName, String methodName, Object[] args, Class<?>[] types, ClusterNode targetNode) throws Exception
callMethodOnNode(String, String, Object[], Class[], long, ClusterNode, boolean)
callMethodOnNode(serviceName, methodName, args, types, Object.class, methodTimeout, targetNode, false)} where
methodTimeout
is the value returned by getMethodCallTimeout()
.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parameterstargetNode
- is the target of the callException
<T> T callMethodOnNode(String serviceName, String methodName, Object[] args, Class<?>[] types, long methodTimeout, ClusterNode targetNode) throws Exception
callMethodOnNode(String, String, Object[], Class[], long, ClusterNode, boolean)
callMethodOnNode(serviceName, methodName, args, types, Object.class, methodTimeout, targetNode, false)}.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersmethodTimeout
- max number of ms to wait for response to arrive before returningtargetNode
- is the target of the callException
<T> T callMethodOnNode(String serviceName, String methodName, Object[] args, Class<?>[] types, long methodTimeout, ClusterNode targetNode, boolean unordered) throws Exception
T
- the expected type of the return valueserviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersmethodTimeout
- max number of ms to wait for response to arrive before returningtargetNode
- is the target of the callunordered
- true
if the HAPartition isn't required to ensure that this RPC is invoked on all nodes in a
consistent order with respect to other RPCs originated by the same nodeException
void callAsyncMethodOnNode(String serviceName, String methodName, Object[] args, Class<?>[] types, ClusterNode targetNode) throws Exception
callAsyncMethodOnNode(String, String, Object[], Class[], ClusterNode, boolean)
callAsynchMethodOnCluster(serviceName, methodName, args, types, methodTimeout, targetNode, false)}.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parameterstargetNode
- is the target of the callException
void callAsyncMethodOnNode(String serviceName, String methodName, Object[] args, Class<?>[] types, ClusterNode targetNode, boolean unordered) throws Exception
serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parameterstargetNode
- is the target of the callunordered
- true
if the HAPartition isn't required to ensure that this RPC is invoked on all nodes in a
consistent order with respect to other RPCs originated by the same nodeException
void callAsyncMethodOnCoordinatorNode(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf) throws Exception
callMethodOnCoordinatorNode(serviceName, methodName, args, types, excludeSelf, false)
.serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- true
if the RPC should not be made on the current node even if the current node is the
coordinatorException
void callAsyncMethodOnCoordinatorNode(String serviceName, String methodName, Object[] args, Class<?>[] types, boolean excludeSelf, boolean unordered) throws Exception
serviceName
- name of the target service name on which calls are invokedmethodName
- 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
- types of the parametersexcludeSelf
- true
if the RPC should not be made on the current node even if the current node is the
coordinatorunordered
- true
if the HAPartition isn't required to ensure that this RPC is invoked on all nodes in a
consistent order with respect to other RPCs originated by the same nodeException
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.