|
eXo Kernel :: Component :: Common Service 2.4.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RPCService
This service provides mechanism to communicate with the other cluster nodes. This service will be based of JGroups as an underlying Transport.
| Field Summary | |
|---|---|
static RuntimePermission |
ACCESS_RPC_SERVICE_PERMISSION
The permission needed to access to any methods of the RPCService |
| Method Summary | |
|---|---|
List<Object> |
executeCommandOnAllNodes(RemoteCommand command,
boolean synchronous,
Serializable... args)
Executes a command on all the cluster nodes. |
List<Object> |
executeCommandOnAllNodes(RemoteCommand command,
long timeout,
Serializable... args)
Executes a command synchronously on all the cluster nodes. |
Object |
executeCommandOnCoordinator(RemoteCommand command,
boolean synchronous,
Serializable... args)
Executes a command on the coordinator only. |
Object |
executeCommandOnCoordinator(RemoteCommand command,
long timeout,
Serializable... args)
Executes a command synchronously on the coordinator only. |
boolean |
isCoordinator()
Indicates whether the local node is the coordinator of the cluster |
RemoteCommand |
registerCommand(RemoteCommand command)
Register a new RemoteCommand instance, it will be mapped to its id. |
void |
registerTopologyChangeListener(TopologyChangeListener listener)
Register a new TopologyChangeListener |
void |
unregisterCommand(RemoteCommand command)
Unregister a RemoteCommand instance, if the id is known or the instance itself is known
otherwise it will be ignored |
void |
unregisterTopologyChangeListener(TopologyChangeListener listener)
Unregister a TopologyChangeListener if it exists |
| Field Detail |
|---|
static final RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
| Method Detail |
|---|
List<Object> executeCommandOnAllNodes(RemoteCommand command,
boolean synchronous,
Serializable... args)
throws RPCException,
SecurityException
RPCException will be thrown.
command - The command to execute on each cluster nodesynchronous - if true, sets group request mode to GroupRequest.GET_ALL,
and if false sets it to GroupRequest.GET_NONE.args - an array of Serializable objects corresponding to parameters of the command
to execute remotely
RPCException - in the event of problems.
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
List<Object> executeCommandOnAllNodes(RemoteCommand command,
long timeout,
Serializable... args)
throws RPCException,
SecurityException
RPCException will be thrown.
command - The command to execute on each cluster nodetimeout - a timeout after which to throw a replication exception.args - an array of Serializable objects corresponding to parameters of the command
to execute remotely
RPCException - in the event of problems.
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
Object executeCommandOnCoordinator(RemoteCommand command,
boolean synchronous,
Serializable... args)
throws RPCException,
SecurityException
RPCException will be thrown.
command - The command to execute on the coordinator nodesynchronous - if true, sets group request mode to GroupRequest.GET_ALL,
and if false sets it to GroupRequest.GET_NONE.args - an array of Serializable objects corresponding to parameters of the command
to execute remotely
RPCException - in the event of problems.
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
Object executeCommandOnCoordinator(RemoteCommand command,
long timeout,
Serializable... args)
throws RPCException,
SecurityException
RPCException will be thrown.
command - The command to execute on the coordinator nodetimeout - a timeout after which to throw a replication exception.args - an array of Serializable objects corresponding to parameters of the command
to execute remotely
RPCException - in the event of problems.
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
RemoteCommand registerCommand(RemoteCommand command)
throws SecurityException
RemoteCommand instance, it will be mapped to its id. If a command with the
same Id has already been registered, a warning will be printed into the log file and the new
command will replace the old one.
command - the instance of the RemoteCommand to register
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
void unregisterCommand(RemoteCommand command)
throws SecurityException
RemoteCommand instance, if the id is known or the instance itself is known
otherwise it will be ignored
command - the command to unregister
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
boolean isCoordinator()
throws RPCException
true if the coordinator is the coordinator, false otherwise
throws RPCException in case the RPCService is in an illegal state
RPCException
void registerTopologyChangeListener(TopologyChangeListener listener)
throws SecurityException
TopologyChangeListener
listener - the listener to be registered
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
void unregisterTopologyChangeListener(TopologyChangeListener listener)
throws SecurityException
TopologyChangeListener if it exists
listener - the listener to unregister
SecurityException - if the SecurityManager is installed and the call method
doesn't have the RuntimePermission ACCESS_RPC_SERVICE_PERMISSION
|
eXo Kernel :: Component :: Common Service 2.4.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||