org.infinispan.remoting
Class InboundInvocationHandlerImpl

java.lang.Object
  extended by org.infinispan.remoting.InboundInvocationHandlerImpl
All Implemented Interfaces:
InboundInvocationHandler

public class InboundInvocationHandlerImpl
extends Object
implements InboundInvocationHandler

Sets the cache interceptor chain on an RPCCommand before calling it to perform

Since:
4.0
Author:
Manik Surtani

Constructor Summary
InboundInvocationHandlerImpl()
           
 
Method Summary
 void applyState(String cacheName, InputStream i)
          Applies state onto a named cache.
 void blockTillNoLongerRetrying(String cacheName)
          Calling this method should block if the invocation handler implementation has been queueing commands for a given named cache and is in the process of flushing this queue.
 void generateState(String cacheName, OutputStream o)
          Generates state from a named cache.
 Response handle(CacheRpcCommand cmd, Address origin)
          Invokes a command on the cache, from a remote source.
 org.infinispan.remoting.InboundInvocationHandlerImpl.JoinHandle howToHandle(CacheRpcCommand cmd)
           
 void inject(GlobalComponentRegistry gcr, StreamingMarshaller marshaller, EmbeddedCacheManager embeddedCacheManager, Transport transport, GlobalConfiguration globalConfiguration)
           
 void start()
           
 void stop()
           
 void waitForStart(CacheRpcCommand cmd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InboundInvocationHandlerImpl

public InboundInvocationHandlerImpl()
Method Detail

inject

public void inject(GlobalComponentRegistry gcr,
                   StreamingMarshaller marshaller,
                   EmbeddedCacheManager embeddedCacheManager,
                   Transport transport,
                   GlobalConfiguration globalConfiguration)

start

public void start()

stop

public void stop()

waitForStart

public void waitForStart(CacheRpcCommand cmd)
                  throws InterruptedException
Throws:
InterruptedException

handle

public Response handle(CacheRpcCommand cmd,
                       Address origin)
                throws Throwable
Description copied from interface: InboundInvocationHandler
Invokes a command on the cache, from a remote source.

Specified by:
handle in interface InboundInvocationHandler
Parameters:
cmd - command to invoke
Returns:
results, if any, from the invocation
Throws:
Throwable - in the event of problems executing the command

howToHandle

public org.infinispan.remoting.InboundInvocationHandlerImpl.JoinHandle howToHandle(CacheRpcCommand cmd)

applyState

public void applyState(String cacheName,
                       InputStream i)
                throws StateTransferException
Description copied from interface: InboundInvocationHandler
Applies state onto a named cache. State to be read from the stream. Implementations should NOT close the stream after use.

Specified by:
applyState in interface InboundInvocationHandler
Parameters:
cacheName - name of cache to apply state
i - stream to read from
Throws:
StateTransferException - in the event of problems

generateState

public void generateState(String cacheName,
                          OutputStream o)
                   throws StateTransferException
Description copied from interface: InboundInvocationHandler
Generates state from a named cache. State to be written to the stream. Implementations should NOT close the stream after use.

Specified by:
generateState in interface InboundInvocationHandler
Parameters:
cacheName - name of cache from which to generate state
o - stream to write state to
Throws:
StateTransferException - in the event of problems

blockTillNoLongerRetrying

public void blockTillNoLongerRetrying(String cacheName)
Description copied from interface: InboundInvocationHandler
Calling this method should block if the invocation handler implementation has been queueing commands for a given named cache and is in the process of flushing this queue. It would block until the queue has been drained.

Specified by:
blockTillNoLongerRetrying in interface InboundInvocationHandler
Parameters:
cacheName - name of the cache for which the handler would be queueing requests.

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.