org.infinispan.remoting
Interface InboundInvocationHandler

All Known Implementing Classes:
InboundInvocationHandlerImpl

public interface InboundInvocationHandler

A globally scoped component, that is able to locate named caches and invoke remotely originating calls on the appropriate cache. The primary goal of this component is to act as a bridge between the globally scoped RpcManager and named-cache scoped components.

Since:
4.0
Author:
Manik Surtani

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 command, Address origin)
          Invokes a command on the cache, from a remote source.
 

Method Detail

handle

Response handle(CacheRpcCommand command,
                Address origin)
                throws Throwable
Invokes a command on the cache, from a remote source.

Parameters:
command - command to invoke
Returns:
results, if any, from the invocation
Throws:
Throwable - in the event of problems executing the command

applyState

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

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

generateState

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

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

blockTillNoLongerRetrying

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. It would block until the queue has been drained.

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.