public interface RpcManager
Transport
.CompletableFuture<Map<Address,Response>> invokeRemotelyAsync(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
recipients
- A list of nodes, or null
to invoke the command on all the members of the clusterrpc
- The command to invokeoptions
- The invocation optionsMap<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.Map<Address,Response> invokeRemotely(Map<Address,ReplicableCommand> rpcs, RpcOptions options)
void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options, NotifyingNotifiableFuture<Object> future)
invokeRemotelyAsync(Collection, ReplicableCommand, RpcOptions)
instead.
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. 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.void invokeRemotelyInFuture(NotifyingNotifiableFuture<Map<Address,Response>> future, Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
invokeRemotelyAsync(Collection, ReplicableCommand, RpcOptions)
instead.
Same as invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand,
RpcOptions, org.infinispan.commons.util.concurrent.NotifyingNotifiableFuture)
but with a different
NotifyingNotifiableFuture type.Transport getTransport()
List<Address> getMembers()
Transport.getMembers()
Address getAddress()
int getTopologyId()
RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode)
RpcOptionsBuilder
.
The RpcOptionsBuilder
is configured with the ResponseMode
and with
DeliverOrder.NONE
if the ResponseMode
is synchronous otherwise, with DeliverOrder.PER_SENDER
if asynchronous.responseMode
- the ResponseMode
.RpcOptionsBuilder
with the default options. The response and deliver mode are set as
described.RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode, DeliverOrder deliverOrder)
RpcOptionsBuilder
.responseMode
- the ResponseMode
.deliverOrder
- the DeliverOrder
.RpcOptionsBuilder
with the default options and the response mode and deliver mode set by the
parameters.RpcOptions getDefaultRpcOptions(boolean sync)
RpcOptionsBuilder
.
The RpcOptionsBuilder
is configured with DeliverOrder.NONE
if the is true
otherwise, with
DeliverOrder.PER_SENDER
.sync
- true
for Synchronous RpcOptionsRpcOptions getDefaultRpcOptions(boolean sync, DeliverOrder deliverOrder)
RpcOptionsBuilder
.sync
- true
for Synchronous RpcOptionsdeliverOrder
- the DeliverOrder
to use.Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.