public interface RpcManager
Transport
.Modifier and Type | Method and Description |
---|---|
void |
broadcastRpcCommand(ReplicableCommand rpc,
boolean sync)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
void |
broadcastRpcCommand(ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
void |
broadcastRpcCommandInFuture(ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future)
Deprecated.
this method may be removed in the future. Use
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture) |
void |
broadcastRpcCommandInFuture(ReplicableCommand rpc,
NotifyingNotifiableFuture<Object> future)
Deprecated.
this method may be removed in the future. Use
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture) |
Address |
getAddress()
Returns the address associated with this RpcManager or null if not part of the cluster.
|
RpcOptions |
getDefaultRpcOptions(boolean sync)
|
RpcOptions |
getDefaultRpcOptions(boolean sync,
boolean fifoOrder)
Builds a RpcOptions based on the parameters
|
List<Address> |
getMembers()
Returns members of a cluster scoped to the cache owning this RpcManager.
|
RpcOptionsBuilder |
getRpcOptionsBuilder(ResponseMode responseMode)
This method is equivalent to
getRpcOptionsBuilder(responseMode, true) |
RpcOptionsBuilder |
getRpcOptionsBuilder(ResponseMode responseMode,
boolean fifoOrder) |
int |
getTopologyId()
Returns the current topology id.
|
Transport |
getTransport() |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter)
Deprecated.
this method may be removed in the future. Use
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions) |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
RpcOptions options)
Invokes an RPC call on other caches in the cluster.
|
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future)
Deprecated.
this method may be removed in the future. Use
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture) |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future,
long timeout)
Deprecated.
this method may be removed in the future. Use
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture) |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> future,
long timeout,
boolean ignoreLeavers)
Deprecated.
this method may be removed in the future. Use
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture) |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
NotifyingNotifiableFuture<Object> future)
Deprecated.
this method may be removed in the future. Use
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture) |
void |
invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
RpcOptions options,
NotifyingNotifiableFuture<Object> future)
The same as
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
except that the task is passed to the transport executor and a Future is returned. |
@Deprecated Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout, boolean usePriorityQueue, ResponseFilter responseFilter)
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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.@Deprecated Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout, boolean usePriorityQueue)
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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.@Deprecated Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout)
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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.@Deprecated void broadcastRpcCommand(ReplicableCommand rpc, boolean sync) throws RpcException
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
rpc
- command to execute remotelysync
- if true, the transport will operate in sync mode. Otherwise, it will operate in async mode.RpcException
- in the event of problems@Deprecated void broadcastRpcCommand(ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws RpcException
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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 usedRpcException
- in the event of problems@Deprecated void broadcastRpcCommandInFuture(ReplicableCommand rpc, NotifyingNotifiableFuture<Object> future)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
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 user@Deprecated void broadcastRpcCommandInFuture(ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
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 user@Deprecated Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, boolean sync) throws RpcException
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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.RpcException
- in the event of problems@Deprecated Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws RpcException
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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 usedRpcException
- in the event of problems@Deprecated void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, NotifyingNotifiableFuture<Object> future)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
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 user@Deprecated void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
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 user@Deprecated void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future, long timeout)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
#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)@Deprecated void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future, long timeout, boolean ignoreLeavers)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions, org.infinispan.util.concurrent.NotifyingNotifiableFuture)
#invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand,
boolean, org.infinispan.util.concurrent.NotifyingNotifiableFuture, long)
except that you can specify a response mode.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)ignoreLeavers
- if true
, recipients that leave or have already left the cluster are ignored
if false
, a SuspectException
is thrown when a leave is detectedMap<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
recipients
- a list of Addresses to invoke the call on. If this is null
, the call is broadcast to the
entire cluster.rpc
- command to execute remotely.options
- it configures the invocation. The same instance can be re-used since RpcManager
does
not change it. Any change in RpcOptions
during a remote invocation can lead to
unpredictable behavior.void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options, NotifyingNotifiableFuture<Object> future)
invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, RpcOptions)
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 on. If this is null
, the call is broadcast to the
entire cluster.rpc
- command to execute remotely.options
- it configures the invocation. The same instance can be re-used since RpcManager
does
not change it. Any change in RpcOptions
during a remote invocation can lead to
unpredictable behavior.future
- the future which will be passed back to the user.Transport getTransport()
List<Address> getMembers()
Transport.getMembers()
Address getAddress()
int getTopologyId()
RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode)
getRpcOptionsBuilder(responseMode, true)
responseMode
- RpcOptionsBuilder
with the default options, the response mode set by
and FIFO deliver order.RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode, boolean fifoOrder)
responseMode
- fifoOrder
- RpcOptionsBuilder
with the default options, the response mode set by
and the deliver order as fifo if the is true
.RpcOptions getDefaultRpcOptions(boolean sync)
getDefaultRpcOptions(boolean, boolean)
.
It is equivalent to getDefaultRpcOptions(sync, true)
sync
- true
for Synchronous RpcOptionsRpcOptions getDefaultRpcOptions(boolean sync, boolean fifoOrder)
sync
- true
for Synchronous RpcOptionsfifoOrder
- Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.