Class MarshallerEncoder
- java.lang.Object
-
- org.infinispan.commons.dataconversion.MarshallerEncoder
-
- All Implemented Interfaces:
Encoder
- Direct Known Subclasses:
GenericJbossMarshallerEncoder,GlobalMarshallerEncoder,JavaSerializationEncoder
public abstract class MarshallerEncoder extends java.lang.Object implements Encoder
Encoder that uses aStreamingMarshallerto convert objects to byte[] and back.- Since:
- 9.1
-
-
Constructor Summary
Constructors Constructor Description MarshallerEncoder(Marshaller marshaller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectfromStorage(java.lang.Object stored)Convert from storage format to the read/write format.booleanisStorageFormatFilterable()protected byte[]marshall(java.lang.Object source)java.lang.ObjecttoStorage(java.lang.Object content)Convert data in the read/write format to the storage format.protected java.lang.Objectunmarshall(byte[] source)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.dataconversion.Encoder
getStorageFormat, id
-
-
-
-
Constructor Detail
-
MarshallerEncoder
public MarshallerEncoder(Marshaller marshaller)
-
-
Method Detail
-
toStorage
public java.lang.Object toStorage(java.lang.Object content)
Description copied from interface:EncoderConvert data in the read/write format to the storage format.
-
fromStorage
public java.lang.Object fromStorage(java.lang.Object stored)
Description copied from interface:EncoderConvert from storage format to the read/write format.- Specified by:
fromStoragein interfaceEncoder- Parameters:
stored- data as stored in the cache, never null.- Returns:
- data in the read/write format
-
isStorageFormatFilterable
public boolean isStorageFormatFilterable()
- Specified by:
isStorageFormatFilterablein interfaceEncoder- Returns:
- if true, will perform stream and related operation in the storage format.
-
unmarshall
protected java.lang.Object unmarshall(byte[] source) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
marshall
protected byte[] marshall(java.lang.Object source) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
-