public final class MarshalledValue extends Object implements Externalizable
MarshalledValueInterceptor
handles transparent wrapping/unwrapping of cached
data.
NOTE: the MarshalledValue
. Implementers of equals()
methods of their keys need to be aware of this.
This class can be marshalled either via its externalizer or via the JVM
serialization. The reason for supporting both methods is to enable
third-party libraries to be able to marshall/unmarshall them using standard
JVM serialization rules. The Infinispan marshalling layer will always
chose the most performant one, aka the externalizer method.MarshalledValueInterceptor
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
MarshalledValue.Externalizer |
Constructor and Description |
---|
MarshalledValue() |
MarshalledValue(byte[] bytes,
int hashCode,
StreamingMarshaller marshaller) |
MarshalledValue(byte[] bytes,
StreamingMarshaller marshaller) |
MarshalledValue(Object instance,
StreamingMarshaller marshaller) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
get()
Returns the 'cached' instance
|
MarshalledValueByteStream |
getRaw() |
int |
hashCode() |
static boolean |
isTypeExcluded(Class<?> type)
Tests whether the type should be excluded from MarshalledValue wrapping.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public MarshalledValue()
public MarshalledValue(byte[] bytes, int hashCode, StreamingMarshaller marshaller)
public MarshalledValue(byte[] bytes, StreamingMarshaller marshaller)
public MarshalledValue(Object instance, StreamingMarshaller marshaller)
public MarshalledValueByteStream getRaw()
public Object get()
public static boolean isTypeExcluded(Class<?> type)
type
- type to test. Should not be null.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.