public class RpcManagerImpl extends Object implements RpcManager, JmxStatisticsExposer
Transport implementation,
and is used to set up the transport and provide lifecycle and dependency hooks into external transport
implementations.| Constructor and Description |
|---|
RpcManagerImpl() |
public void injectDependencies(Transport t, Configuration cfg, ReplicationQueue replicationQueue, CommandsFactory cf, StateTransferManager stateTransferManager, TimeService timeService)
public String getCommittedViewAsString()
public String getPendingViewAsString()
public CompletableFuture<Map<Address,Response>> invokeRemotelyAsync(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
RpcManagerinvokeRemotelyAsync in interface RpcManagerrecipients - A list of nodes, or null to invoke the command on all the members of the clusterrpc - The command to invokeoptions - The invocation optionsprotected <T> T rethrowAsCacheException(Throwable throwable)
public Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
RpcManagerinvokeRemotely in interface RpcManagerrecipients - 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 RpcManagerpublic void invokeRemotelyInFuture(NotifyingNotifiableFuture<Map<Address,Response>> future, Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options)
invokeRemotelyInFuture in interface RpcManagerpublic void invokeRemotelyInFuture(Collection<Address> recipients, ReplicableCommand rpc, RpcOptions options, NotifyingNotifiableFuture<Object> future)
invokeRemotelyInFuture in interface RpcManagerrecipients - 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 Transport getTransport()
getTransport in interface RpcManagerpublic void resetStatistics()
JmxStatisticsExposerresetStatistics in interface JmxStatisticsExposerpublic long getReplicationCount()
public long getReplicationFailures()
public boolean isStatisticsEnabled()
public boolean getStatisticsEnabled()
JmxStatisticsExposergetStatisticsEnabled in interface JmxStatisticsExposer@Deprecated public void setStatisticsEnabled(boolean statisticsEnabled)
JmxStatisticsExposersetStatisticsEnabled in interface JmxStatisticsExposerstatisticsEnabled - true if statistics should be capturedpublic String getSuccessRatio()
public double getSuccessRatioFloatingPoint()
public long getAverageReplicationTime()
public void setTransport(Transport t)
public Address getAddress()
RpcManagergetAddress in interface RpcManagerpublic int getTopologyId()
RpcManagergetTopologyId in interface RpcManagerpublic RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode)
RpcManagerRpcOptionsBuilder.
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 RpcManagerresponseMode - the ResponseMode.RpcOptionsBuilder with the default options. The response and deliver mode are set as
described.public RpcOptionsBuilder getRpcOptionsBuilder(ResponseMode responseMode, DeliverOrder deliverOrder)
RpcManagerRpcOptionsBuilder.getRpcOptionsBuilder in interface RpcManagerresponseMode - 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)
RpcManagerRpcOptionsBuilder.
The RpcOptionsBuilder is configured with DeliverOrder.NONE if the is true otherwise, with
DeliverOrder.PER_SENDER.getDefaultRpcOptions in interface RpcManagersync - true for Synchronous RpcOptionspublic RpcOptions getDefaultRpcOptions(boolean sync, DeliverOrder deliverOrder)
RpcManagerRpcOptionsBuilder.getDefaultRpcOptions in interface RpcManagersync - true for Synchronous RpcOptionsdeliverOrder - the DeliverOrder to use.public List<Address> getMembers()
RpcManagerTransport.getMembers()getMembers in interface RpcManagerCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.