|
||||||||||
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, by formatting and passing requests down to
the registered Transport
.
Method Summary | |
---|---|
void |
broadcastRpcCommand(ReplicableCommand rpc,
boolean sync)
Broadcasts an RPC command to the entire cluster. |
void |
broadcastRpcCommand(ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue)
Broadcasts an RPC command to the entire cluster. |
void |
broadcastRpcCommandInFuture(ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future)
The same as broadcastRpcCommand(org.infinispan.commands.ReplicableCommand, boolean, boolean) except that
the task is passed to the transport executor and a Future is returned. |
void |
broadcastRpcCommandInFuture(ReplicableCommand rpc,
NotifyingNotifiableFuture<Object> future)
The same as broadcastRpcCommand(org.infinispan.commands.ReplicableCommand, boolean) except that the task
is passed to the transport executor and a Future is returned. |
Address |
getCurrentStateTransferSource()
If retrieveState(String, long) has been invoked and hasn't yet returned (i.e., a state transfer is in
progress), this method will return the current Address from which a state transfer is being attempted. |
Transport |
getTransport()
|
void |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync)
Broadcasts an RPC command to a specified set of recipients |
void |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue)
Broadcasts an RPC command to a specified set of recipients |
List<Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout)
Invokes an RPC call on other caches in the cluster. |
List<Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue)
Invokes an RPC call on other caches in the cluster. |
List<Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter)
Invokes an RPC call on other caches in the cluster. |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future)
The same as invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, boolean)
except that the task is passed to the transport executor and a Future is returned. |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future,
long timeout)
The same as invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand,
boolean, org.infinispan.util.concurrent.NotifyingNotifiableFuture) except that you can specify a timeout. |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
NotifyingNotifiableFuture<Object> future)
The same as invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, boolean)
except that the task is passed to the transport executor and a Future is returned. |
void |
retrieveState(String cacheName,
long timeout)
Initiates a state retrieval process from neighbouring caches. |
Method Detail |
---|
List<Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout, boolean usePriorityQueue, ResponseFilter responseFilter)
recipients
- a list of Addresses to invoke the call on. If this is null, the call is broadcast to the
entire cluster.rpcCommand
- the cache command to invokemode
- the response mode to usetimeout
- a timeout after which to throw a replication exception.usePriorityQueue
- if true, a priority queue is used to deliver messages. May not be supported by all
implementations.responseFilter
- a response filter with which to filter out failed/unwanted/invalid responses.
Exception
- in the event of problems.List<Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout, boolean usePriorityQueue)
recipients
- a list of Addresses to invoke the call on. If this is null, the call is broadcast to the
entire cluster.rpcCommand
- the cache command to invokemode
- the response mode to usetimeout
- a timeout after which to throw a replication exception.usePriorityQueue
- if true, a priority queue is used to deliver messages. May not be supported by all
implementations.
Exception
- in the event of problems.List<Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout) throws Exception
recipients
- a list of Addresses to invoke the call on. If this is null, the call is broadcast to the entire
cluster.rpcCommand
- the cache command to invokemode
- the response mode to usetimeout
- a timeout after which to throw a replication exception.
Exception
- in the event of problems.void retrieveState(String cacheName, long timeout) throws StateTransferException
cacheName
- name of cache requesting statetimeout
- length of time to try to retrieve state on each peer
StateTransferException
- in the event of problemsvoid broadcastRpcCommand(ReplicableCommand rpc, boolean sync) throws ReplicationException
rpc
- command to execute remotelysync
- if true, the transport will operate in sync mode. Otherwise, it will operate in async mode.
ReplicationException
- in the event of problemsvoid broadcastRpcCommand(ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws ReplicationException
rpc
- command to execute remotelysync
- if true, the transport will operate in sync mode. Otherwise, it will operate in async
mode.usePriorityQueue
- if true, a priority queue is used
ReplicationException
- in the event of problemsvoid broadcastRpcCommandInFuture(ReplicableCommand rpc, NotifyingNotifiableFuture<Object> future)
broadcastRpcCommand(org.infinispan.commands.ReplicableCommand, boolean)
except that the task
is passed to the transport executor and a Future is returned. The transport always deals with this
synchronously.
rpc
- command to execute remotelyfuture
- the future which will be passed back to the uservoid broadcastRpcCommandInFuture(ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future)
broadcastRpcCommand(org.infinispan.commands.ReplicableCommand, boolean, boolean)
except that
the task is passed to the transport executor and a Future is returned. The transport always deals with this
synchronously.
rpc
- command to execute remotelyusePriorityQueue
- if true, a priority queue is usedfuture
- the future which will be passed back to the uservoid invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, boolean sync) throws ReplicationException
recipients
- recipients to invoke remote command onrpc
- command to execute remotelysync
- if true, the transport will operate in sync mode. Otherwise, it will operate in async mode.
ReplicationException
- in the event of problemsvoid invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws ReplicationException
recipients
- recipients to invoke remote command onrpc
- command to execute remotelysync
- if true, the transport will operate in sync mode. Otherwise, it will operate in async
mode.usePriorityQueue
- if true, a priority queue is used
ReplicationException
- in the event of problemsvoid invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, NotifyingNotifiableFuture<Object> future)
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, boolean)
except that the task is passed to the transport executor and a Future is returned. The transport always deals
with this synchronously.
recipients
- recipients to invoke remote call onrpc
- command to execute remotelyfuture
- the future which will be passed back to the uservoid invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future)
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, boolean)
except that the task is passed to the transport executor and a Future is returned. The transport always deals
with this synchronously.
recipients
- recipients to invoke remote call onrpc
- command to execute remotelyusePriorityQueue
- if true, a priority queue is usedfuture
- the future which will be passed back to the uservoid invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future, long timeout)
invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand,
boolean, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
except that you can specify a timeout.
recipients
- recipients to invoke remote call onrpc
- command to execute remotelyusePriorityQueue
- if true, a priority queue is usedfuture
- the future which will be passed back to the usertimeout
- after which to give up (in millis)Transport getTransport()
Address getCurrentStateTransferSource()
retrieveState(String, long)
has been invoked and hasn't yet returned (i.e., a state transfer is in
progress), this method will return the current Address from which a state transfer is being attempted. Otherwise,
this method returns a null.
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |