org.infinispan.interceptors
Class MarshalledValueInterceptor

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

public class MarshalledValueInterceptor
extends CommandInterceptor

Interceptor that handles the wrapping and unwrapping of cached data using MarshalledValues. Known "excluded" types are not wrapped/unwrapped, which at this time include String, Java primitives and their Object wrappers, as well as arrays of excluded types.

The MarshalledValue wrapper handles lazy deserialization from byte array representations.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org), Mircea.Markus@jboss.com, Galder ZamarreƱo
See Also:
MarshalledValue

Field Summary
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration
 
Constructor Summary
MarshalledValueInterceptor()
           
 
Method Summary
protected  MarshalledValue createMarshalledValue(Object toWrap, InvocationContext ctx)
           
protected  Log getLog()
           
protected  void injectMarshaller(StreamingMarshaller marshaller, InternalEntryFactory entryFactory)
           
protected  void start()
           
 Object visitEntrySetCommand(InvocationContext ctx, EntrySetCommand command)
           
 Object visitEvictCommand(InvocationContext ctx, EvictCommand command)
           
 Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
           
 Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command)
           
 Object visitKeySetCommand(InvocationContext ctx, KeySetCommand 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)
           
 Object visitValuesCommand(InvocationContext ctx, ValuesCommand command)
           
protected  Map<Object,Object> wrapMap(Map<Object,Object> m, Set<MarshalledValue> marshalledValues, InvocationContext ctx)
           
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitApplyDeltaCommand, visitClearCommand, visitCollection, visitCommitCommand, visitDistributedExecuteCommand, visitInvalidateL1Command, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledValueInterceptor

public MarshalledValueInterceptor()
Method Detail

getLog

protected Log getLog()
Overrides:
getLog in class CommandInterceptor

injectMarshaller

protected void injectMarshaller(StreamingMarshaller marshaller,
                                InternalEntryFactory entryFactory)

start

protected void start()

visitLockControlCommand

public Object visitLockControlCommand(TxInvocationContext ctx,
                                      LockControlCommand command)
                               throws Throwable
Specified by:
visitLockControlCommand in interface Visitor
Overrides:
visitLockControlCommand 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

visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand 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

visitEvictCommand

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

visitGetKeyValueCommand

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

visitKeySetCommand

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

visitValuesCommand

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

visitEntrySetCommand

public Object visitEntrySetCommand(InvocationContext ctx,
                                   EntrySetCommand command)
                            throws Throwable
Specified by:
visitEntrySetCommand in interface Visitor
Overrides:
visitEntrySetCommand 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

visitInvalidateCommand

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

wrapMap

protected Map<Object,Object> wrapMap(Map<Object,Object> m,
                                     Set<MarshalledValue> marshalledValues,
                                     InvocationContext ctx)

createMarshalledValue

protected MarshalledValue createMarshalledValue(Object toWrap,
                                                InvocationContext ctx)

-->

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