|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RPCManager
Provides a mechanism for communicating with other caches in the cluster. For now this is based on JGroups as an underlying transport, and in future more transport options may become available.
Implementations have a simple lifecycle:
Method Summary | |
---|---|
List<Object> |
callRemoteMethods(Vector<org.jgroups.Address> recipients,
ReplicableCommand cacheCommand,
boolean synchronous,
long timeout,
boolean useOutOfBandMessage)
Invokes an RPC call on other caches in the cluster. |
List<Object> |
callRemoteMethods(Vector<org.jgroups.Address> recipients,
ReplicableCommand cacheCommand,
int mode,
long timeout,
boolean useOutOfBandMessage)
Invokes an RPC call on other caches in the cluster. |
List<Object> |
callRemoteMethods(Vector<org.jgroups.Address> recipients,
ReplicableCommand cacheCommand,
int mode,
long timeout,
org.jgroups.blocks.RspFilter responseFilter,
boolean useOutOfBandMessage)
Invokes an RPC call on other caches in the cluster. |
void |
disconnect()
Disconnects and closes the underlying JGroups channel. |
void |
fetchPartialState(List<org.jgroups.Address> sources,
Fqn subtree)
Retrieves partial state from remote instances. |
void |
fetchPartialState(List<org.jgroups.Address> sources,
Fqn sourceTarget,
Fqn integrationTarget)
Retrieves partial state from remote instances. |
org.jgroups.Channel |
getChannel()
Retrieves the Channel |
org.jgroups.Address |
getCoordinator()
|
org.jgroups.Address |
getLocalAddress()
Retrieves the local JGroups channel's address |
List<org.jgroups.Address> |
getMembers()
Returns a defensively copied list of members in the current cluster view. |
boolean |
isCoordinator()
|
void |
start()
Starts the RPCManager by connecting the underlying JGroups channel (if configured for replication). |
void |
stop()
Stops the RPCDispatcher and frees resources. |
Method Detail |
---|
void disconnect()
void stop()
void start()
List<Object> callRemoteMethods(Vector<org.jgroups.Address> recipients, ReplicableCommand cacheCommand, int mode, long timeout, org.jgroups.blocks.RspFilter responseFilter, boolean useOutOfBandMessage) throws Exception
recipients
- a list of Addresses to invoke the call on. If this is null, the call is broadcast to the entire cluster.cacheCommand
- the cache command to invokemode
- the group request mode to use. See GroupRequest
.timeout
- a timeout after which to throw a replication exception.responseFilter
- a response filter with which to filter out failed/unwanted/invalid responses.useOutOfBandMessage
- if true, the message is put on JGroups' OOB queue. See JGroups docs for more info.
Exception
- in the event of problems.List<Object> callRemoteMethods(Vector<org.jgroups.Address> recipients, ReplicableCommand cacheCommand, int mode, long timeout, boolean useOutOfBandMessage) throws Exception
recipients
- a list of Addresses to invoke the call on. If this is null, the call is broadcast to the entire cluster.cacheCommand
- the cache command to invokemode
- the group request mode to use. See GroupRequest
.timeout
- a timeout after which to throw a replication exception.useOutOfBandMessage
- if true, the message is put on JGroups' OOB queue. See JGroups docs for more info.
Exception
- in the event of problems.List<Object> callRemoteMethods(Vector<org.jgroups.Address> recipients, ReplicableCommand cacheCommand, boolean synchronous, long timeout, boolean useOutOfBandMessage) throws Exception
recipients
- a list of Addresses to invoke the call on. If this is null, the call is broadcast to the entire cluster.cacheCommand
- the cache command to invokesynchronous
- if true, sets group request mode to GroupRequest.GET_ALL
, and if false sets it to GroupRequest.GET_NONE
.timeout
- a timeout after which to throw a replication exception.useOutOfBandMessage
- if true, the message is put on JGroups' OOB queue. See JGroups docs for more info.
Exception
- in the event of problems.boolean isCoordinator()
org.jgroups.Address getCoordinator()
org.jgroups.Address getLocalAddress()
List<org.jgroups.Address> getMembers()
void fetchPartialState(List<org.jgroups.Address> sources, Fqn sourceTarget, Fqn integrationTarget) throws Exception
sources
- sources to consider for a state transfersourceTarget
- Fqn on source to retrieve state forintegrationTarget
- integration point on local cache to apply state
Exception
- in the event of problemsvoid fetchPartialState(List<org.jgroups.Address> sources, Fqn subtree) throws Exception
sources
- sources to consider for a state transfersubtree
- Fqn subtree to retrieve. Will be integrated at the same point.
Exception
- in the event of problemsorg.jgroups.Channel getChannel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |