org.infinispan.interceptors
Class IsMarshallableInterceptor

java.lang.Object
  extended by org.infinispan.commands.AbstractVisitor
      extended by org.infinispan.interceptors.base.CommandInterceptor
          extended by org.infinispan.interceptors.IsMarshallableInterceptor
All Implemented Interfaces:
Visitor

public class IsMarshallableInterceptor
extends CommandInterceptor

Interceptor to verify whether parameters passed into cache are marshallables or not. This is handy in situations where we want to find out before marshalling whether the type of object is marshallable. Such situations include lazy deserialization, or when marshalling happens in a separate thread and marshalling failures might be swallowed.

This interceptor offers the possibility to discover these issues way before the code has moved onto a different thread where it's harder to communicate with the original request thread.

Since:
4.2
Author:
Galder ZamarreƱo

Field Summary
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
IsMarshallableInterceptor()
           
 
Method Summary
protected  void injectMarshaller(StreamingMarshaller marshaller, DistributionManager distManager)
           
protected  void start()
           
 Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
           
 Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command)
           
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command)
           
 Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
           
 Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command)
           
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitClearCommand, visitCollection, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsMarshallableInterceptor

public IsMarshallableInterceptor()
Method Detail

injectMarshaller

protected void injectMarshaller(StreamingMarshaller marshaller,
                                DistributionManager distManager)

start

protected void start()

visitGetKeyValueCommand

public Object visitGetKeyValueCommand(InvocationContext ctx,
                                      GetKeyValueCommand command)
                               throws Throwable
Specified by:
visitGetKeyValueCommand in interface Visitor
Overrides:
visitGetKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitLockControlCommand

public Object visitLockControlCommand(TxInvocationContext ctx,
                                      LockControlCommand command)
                               throws Throwable
Specified by:
visitLockControlCommand in interface Visitor
Overrides:
visitLockControlCommand in class AbstractVisitor
Throws:
Throwable

visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitPutMapCommand

public Object visitPutMapCommand(InvocationContext ctx,
                                 PutMapCommand command)
                          throws Throwable
Specified by:
visitPutMapCommand in interface Visitor
Overrides:
visitPutMapCommand in class AbstractVisitor
Throws:
Throwable

visitRemoveCommand

public Object visitRemoveCommand(InvocationContext ctx,
                                 RemoveCommand command)
                          throws Throwable
Specified by:
visitRemoveCommand in interface Visitor
Overrides:
visitRemoveCommand in class AbstractVisitor
Throws:
Throwable

visitReplaceCommand

public Object visitReplaceCommand(InvocationContext ctx,
                                  ReplaceCommand command)
                           throws Throwable
Specified by:
visitReplaceCommand in interface Visitor
Overrides:
visitReplaceCommand in class AbstractVisitor
Throws:
Throwable

-->

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