org.infinispan.remoting.transport.jgroups
Class CommandAwareRpcDispatcher
java.lang.Object
org.jgroups.blocks.MessageDispatcher
org.jgroups.blocks.RpcDispatcher
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher
- All Implemented Interfaces:
- org.jgroups.blocks.RequestHandler, org.jgroups.ChannelListener
public class CommandAwareRpcDispatcher
- extends org.jgroups.blocks.RpcDispatcher
A JGroups RPC dispatcher that knows how to deal with ReplicableCommand
s.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
Nested classes/interfaces inherited from class org.jgroups.blocks.RpcDispatcher |
org.jgroups.blocks.RpcDispatcher.Marshaller |
Fields inherited from class org.jgroups.blocks.RpcDispatcher |
method_lookup, req_marshaller, rsp_marshaller, server_obj |
Fields inherited from class org.jgroups.blocks.MessageDispatcher |
async_anycasts, async_multicasts, async_unicasts, channel, channel_listeners, corr, hardware_multicast_supported, local_addr, members, membership_listener, msg_listener, probe_handler, prot_adapter, req_handler, sync_anycasts, sync_multicasts, sync_unicasts |
Method Summary |
org.jgroups.util.RspList<Object> |
broadcastRemoteCommands(ReplicableCommand command,
org.jgroups.blocks.ResponseMode mode,
long timeout,
boolean anycasting,
boolean oob,
org.jgroups.blocks.RspFilter filter,
boolean asyncMarshalling)
|
Object |
handle(org.jgroups.Message req)
Message contains a Command. |
Response |
invokeRemoteCommand(org.jgroups.Address recipient,
ReplicableCommand command,
org.jgroups.blocks.ResponseMode mode,
long timeout,
boolean oob,
boolean asyncMarshalling)
|
org.jgroups.util.RspList<Object> |
invokeRemoteCommands(List<org.jgroups.Address> recipients,
ReplicableCommand command,
org.jgroups.blocks.ResponseMode mode,
long timeout,
boolean anycasting,
boolean oob,
org.jgroups.blocks.RspFilter filter,
boolean asyncMarshalling)
|
String |
toString()
|
Methods inherited from class org.jgroups.blocks.RpcDispatcher |
callRemoteMethod, callRemoteMethod, callRemoteMethods, callRemoteMethods, callRemoteMethodsWithFuture, callRemoteMethodWithFuture, correlatorStarted, getMarshaller, getMethodLookup, getName, getRequestMarshaller, getResponseMarshaller, getServerObject, setMarshaller, setMethodLookup, setRequestMarshaller, setResponseMarshaller, setServerObject |
Methods inherited from class org.jgroups.blocks.MessageDispatcher |
addChannelListener, cast, castMessage, castMessageWithFuture, channelClosed, channelConnected, channelDisconnected, createRequestCorrelator, done, getChannel, getMessageListener, getProtocolAdapter, installUpHandler, removeChannelListener, sendMessage, sendMessageWithFuture, setChannel, setMembers, setMembershipListener, setMessageListener, setRequestHandler, start, stop |
Methods inherited from interface org.jgroups.ChannelListener |
channelClosed, channelConnected, channelDisconnected |
CommandAwareRpcDispatcher
public CommandAwareRpcDispatcher(org.jgroups.Channel channel,
JGroupsTransport transport,
ExecutorService asyncExecutor,
InboundInvocationHandler inboundInvocationHandler)
invokeRemoteCommands
public org.jgroups.util.RspList<Object> invokeRemoteCommands(List<org.jgroups.Address> recipients,
ReplicableCommand command,
org.jgroups.blocks.ResponseMode mode,
long timeout,
boolean anycasting,
boolean oob,
org.jgroups.blocks.RspFilter filter,
boolean asyncMarshalling)
throws InterruptedException
- Parameters:
recipients
- Guaranteed not to be null. Must not contain self.
- Throws:
InterruptedException
invokeRemoteCommand
public Response invokeRemoteCommand(org.jgroups.Address recipient,
ReplicableCommand command,
org.jgroups.blocks.ResponseMode mode,
long timeout,
boolean oob,
boolean asyncMarshalling)
throws InterruptedException
- Throws:
InterruptedException
broadcastRemoteCommands
public org.jgroups.util.RspList<Object> broadcastRemoteCommands(ReplicableCommand command,
org.jgroups.blocks.ResponseMode mode,
long timeout,
boolean anycasting,
boolean oob,
org.jgroups.blocks.RspFilter filter,
boolean asyncMarshalling)
throws InterruptedException
- Throws:
InterruptedException
handle
public Object handle(org.jgroups.Message req)
- Message contains a Command. Execute it against *this* object and return result.
- Specified by:
handle
in interface org.jgroups.blocks.RequestHandler
- Overrides:
handle
in class org.jgroups.blocks.RpcDispatcher
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.