org.jboss.cache.interceptors
Class MarshalledValueInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.MarshalledValueInterceptor
- All Implemented Interfaces:
- InterceptorMBean
public class MarshalledValueInterceptor
- extends Interceptor
Interceptor that handles the wrapping and unwrapping of cached data using MarshalledValue
s.
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:
- 2.1.0
- Author:
- Manik Surtani (manik@jboss.org)
- See Also:
MarshalledValue
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
assertTransactionValid, dumpStatistics, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, resetStatistics, setCache, setLast, setNext, setStatisticsEnabled, toString |
MarshalledValueInterceptor
public MarshalledValueInterceptor()
invoke
public Object invoke(InvocationContext context)
throws Throwable
- Description copied from class:
Interceptor
- Using this method call for forwarding a call in the chain is not redable and error prone in the case of interceptors
extending other interceptors. This metod rather refers to interceptor doing its business operations rather than
delegating to the nextInterceptor interceptor in chain. For delegation please use
Interceptor.nextInterceptor(org.jboss.cache.InvocationContext)
- Overrides:
invoke
in class Interceptor
- Throws:
Throwable
isInternalCollection
protected boolean isInternalCollection(int argSubscript,
int methodId)
- prepare methods include Maps and Lists in args. These should not be mistaken for needing wrapping as MarshalledValues.
needToReplaceMap
protected boolean needToReplaceMap(int argSubscript,
int methodId)
- put(Map) contents should not be wrapped since the map will need to be iterated over. The contents of the Map, however, should be wrapped.
wrapMap
protected Map wrapMap(Map<Object,Object> m,
Set<MarshalledValue> marshalledValues,
InvocationContext ctx)
throws NotSerializableException
- Throws:
NotSerializableException
createAndAddMarshalledValue
protected MarshalledValue createAndAddMarshalledValue(Object toWrap,
Set<MarshalledValue> marshalledValues,
InvocationContext ctx)
throws NotSerializableException
- Throws:
NotSerializableException
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.