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 Object implements Encoder
Encoder that uses aStreamingMarshaller
to 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 Object
fromStorage(Object stored)
Convert from storage format to the read/write format.boolean
isStorageFormatFilterable()
protected byte[]
marshall(Object source)
Object
toStorage(Object content)
Convert data in the read/write format to the storage format.protected Object
unmarshall(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 Object toStorage(Object content)
Description copied from interface:Encoder
Convert data in the read/write format to the storage format.
-
fromStorage
public Object fromStorage(Object stored)
Description copied from interface:Encoder
Convert from storage format to the read/write format.- Specified by:
fromStorage
in interfaceEncoder
- Parameters:
stored
- data as stored in the cache, never null.- Returns:
- data in the read/write format
-
isStorageFormatFilterable
public boolean isStorageFormatFilterable()
- Specified by:
isStorageFormatFilterable
in interfaceEncoder
- Returns:
- if true, will perform stream and related operation in the storage format.
-
unmarshall
protected Object unmarshall(byte[] source) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
marshall
protected byte[] marshall(Object source) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-