public class ExtendedStatisticRpcManager extends Object implements RpcManager
Constructor and Description |
---|
ExtendedStatisticRpcManager(RpcManager actual,
CacheStatisticManager cacheStatisticManager,
TimeService timeService) |
public ExtendedStatisticRpcManager(RpcManager actual, CacheStatisticManager cacheStatisticManager, TimeService timeService)
public CompletableFuture<Map<Address,Response>> invokeRemotelyAsync(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
RpcManager
invokeRemotelyAsync
in interface RpcManager
recipients
- A list of nodes, or null
to invoke the command on all the members of the clusterrpc
- The command to invokeoptions
- The invocation optionspublic Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
RpcManager
invokeRemotely
in interface RpcManager
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.public Map<Address,Response> invokeRemotely(Map<Address,ReplicableCommand> rpcs, RpcOptions options)
invokeRemotely
in interface RpcManager
public void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options, NotifyingNotifiableFuture<Object> future)
invokeRemotelyInFuture
in interface RpcManager
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.public void invokeRemotelyInFuture(NotifyingNotifiableFuture<Map<Address,Response>> future, Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
invokeRemotelyInFuture
in interface RpcManager
public RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode)
RpcManager
RpcOptionsBuilder
.
The RpcOptionsBuilder
is configured with the ResponseMode
and with
DeliverOrder.NONE
if the ResponseMode
is synchronous otherwise, with DeliverOrder.PER_SENDER
if asynchronous.getRpcOptionsBuilder
in interface RpcManager
responseMode
- the ResponseMode
.RpcOptionsBuilder
with the default options. The response and deliver mode are set as
described.public RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode, DeliverOrder deliverOrder)
RpcManager
RpcOptionsBuilder
.getRpcOptionsBuilder
in interface RpcManager
responseMode
- the ResponseMode
.deliverOrder
- the DeliverOrder
.RpcOptionsBuilder
with the default options and the response mode and deliver mode set by the
parameters.public RpcOptions getDefaultRpcOptions(boolean sync)
RpcManager
RpcOptionsBuilder
.
The RpcOptionsBuilder
is configured with DeliverOrder.NONE
if the is true
otherwise, with
DeliverOrder.PER_SENDER
.getDefaultRpcOptions
in interface RpcManager
sync
- true
for Synchronous RpcOptionspublic RpcOptions getDefaultRpcOptions(boolean sync, DeliverOrder deliverOrder)
RpcManager
RpcOptionsBuilder
.getDefaultRpcOptions
in interface RpcManager
sync
- true
for Synchronous RpcOptionsdeliverOrder
- the DeliverOrder
to use.public Transport getTransport()
getTransport
in interface RpcManager
public List<Address> getMembers()
RpcManager
Transport.getMembers()
getMembers
in interface RpcManager
public Address getAddress()
RpcManager
getAddress
in interface RpcManager
public int getTopologyId()
RpcManager
getTopologyId
in interface RpcManager
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.