|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.remoting.rpc.RpcManagerImpl
public class RpcManagerImpl
This component really is just a wrapper around a Transport implementation,
and is used to set up the transport and provide lifecycle and dependency hooks into external transport
implementations.
| Constructor Summary | |
|---|---|
RpcManagerImpl()
|
|
| 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> l)
The same as RpcManager.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> l)
The same as RpcManager.broadcastRpcCommand(org.infinispan.commands.ReplicableCommand, boolean) except that the task
is passed to the transport executor and a Future is returned. |
Address |
getAddress()
Returns the address associated with this RpcManager or null if not part of the cluster. |
long |
getAverageReplicationTime()
|
int |
getClusterSize()
|
Address |
getCurrentStateTransferSource()
If RpcManager.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. |
String |
getMembers()
|
String |
getNodeAddress()
|
String |
getPhysicalAddresses()
|
long |
getReplicationCount()
|
long |
getReplicationFailures()
|
String |
getSuccessRatio()
|
double |
getSuccessRatioFloatingPoint()
|
Transport |
getTransport()
|
void |
injectDependencies(Transport t,
Configuration configuration,
ReplicationQueue replicationQueue,
CommandsFactory cf,
ExecutorService e)
|
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 |
void |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue,
long timeout)
|
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> l)
The same as RpcManager.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> l,
long timeout)
The same as RpcManager.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> l)
The same as RpcManager.invokeRemotely(java.util.Collection, org.infinispan.commands.ReplicableCommand, boolean)
except that the task is passed to the transport executor and a Future is returned. |
boolean |
isStatisticsEnabled()
|
void |
resetStatistics()
|
void |
retrieveState(String cacheName,
long timeout)
Initiates a state retrieval process from neighbouring caches. |
void |
setStatisticsEnabled(boolean statisticsEnabled)
|
void |
setTransport(Transport t)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RpcManagerImpl()
| Method Detail |
|---|
public void injectDependencies(Transport t,
Configuration configuration,
ReplicationQueue replicationQueue,
CommandsFactory cf,
ExecutorService e)
public final List<Response> invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter)
RpcManager
invokeRemotely in interface RpcManagerrecipients - 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.
public final List<Response> invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue)
RpcManager
invokeRemotely in interface RpcManagerrecipients - 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.
public final List<Response> invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout)
throws Exception
RpcManager
invokeRemotely in interface RpcManagerrecipients - 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.
public void retrieveState(String cacheName,
long timeout)
throws StateTransferException
RpcManager
retrieveState in interface RpcManagercacheName - name of cache requesting statetimeout - length of time to try to retrieve state on each peer
StateTransferException - in the event of problems
public final void broadcastRpcCommand(ReplicableCommand rpc,
boolean sync)
throws ReplicationException
RpcManager
broadcastRpcCommand in interface RpcManagerrpc - 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 problems
public final void broadcastRpcCommand(ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue)
throws ReplicationException
RpcManager
broadcastRpcCommand in interface RpcManagerrpc - 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 problems
public final void broadcastRpcCommandInFuture(ReplicableCommand rpc,
NotifyingNotifiableFuture<Object> l)
RpcManagerRpcManager.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.
broadcastRpcCommandInFuture in interface RpcManagerrpc - command to execute remotelyl - the future which will be passed back to the user
public final void broadcastRpcCommandInFuture(ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> l)
RpcManagerRpcManager.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.
broadcastRpcCommandInFuture in interface RpcManagerrpc - command to execute remotelyusePriorityQueue - if true, a priority queue is usedl - the future which will be passed back to the user
public final void invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync)
throws ReplicationException
RpcManager
invokeRemotely in interface RpcManagerrecipients - 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 problems
public final void invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue)
throws ReplicationException
RpcManager
invokeRemotely in interface RpcManagerrecipients - 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 problems
public final void invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpc,
boolean sync,
boolean usePriorityQueue,
long timeout)
throws ReplicationException
ReplicationException
public final void invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
NotifyingNotifiableFuture<Object> l)
RpcManagerRpcManager.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.
invokeRemotelyInFuture in interface RpcManagerrecipients - recipients to invoke remote call onrpc - command to execute remotelyl - the future which will be passed back to the user
public final void invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> l)
RpcManagerRpcManager.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.
invokeRemotelyInFuture in interface RpcManagerrecipients - recipients to invoke remote call onrpc - command to execute remotelyusePriorityQueue - if true, a priority queue is usedl - the future which will be passed back to the user
public final void invokeRemotelyInFuture(Collection<Address> recipients,
ReplicableCommand rpc,
boolean usePriorityQueue,
NotifyingNotifiableFuture<Object> l,
long timeout)
RpcManagerRpcManager.invokeRemotelyInFuture(java.util.Collection, org.infinispan.commands.ReplicableCommand,
boolean, org.infinispan.util.concurrent.NotifyingNotifiableFuture) except that you can specify a timeout.
invokeRemotelyInFuture in interface RpcManagerrecipients - recipients to invoke remote call onrpc - command to execute remotelyusePriorityQueue - if true, a priority queue is usedl - the future which will be passed back to the usertimeout - after which to give up (in millis)public Transport getTransport()
getTransport in interface RpcManagerpublic Address getCurrentStateTransferSource()
RpcManagerRpcManager.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.
getCurrentStateTransferSource in interface RpcManagerpublic void resetStatistics()
public long getReplicationCount()
public long getReplicationFailures()
public boolean isStatisticsEnabled()
public void setStatisticsEnabled(boolean statisticsEnabled)
public String getNodeAddress()
public String getPhysicalAddresses()
public String getMembers()
public int getClusterSize()
public String getSuccessRatio()
public double getSuccessRatioFloatingPoint()
public long getAverageReplicationTime()
public void setTransport(Transport t)
public Address getAddress()
RpcManager
getAddress in interface RpcManager
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||