Class ObjectSerializer
java.lang.Object
org.mybatis.caches.ehcache.ObjectSerializer
- All Implemented Interfaces:
org.ehcache.spi.serialization.Serializer<Object>
public class ObjectSerializer
extends Object
implements org.ehcache.spi.serialization.Serializer<Object>
Ehcache 3
Serializer that uses standard Java serialization. This serializer is required when off-heap or
disk-based storage tiers are used, since those tiers cannot store object references directly.
Note: heap-only caches do not need serialization; this class is provided for configurations that add off-heap or disk tiers.
-
Constructor Summary
ConstructorsConstructorDescriptionObjectSerializer(ClassLoader loader) Constructor required by Ehcache 3's serializer contract. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(Object object, ByteBuffer binary) read(ByteBuffer binary)
-
Constructor Details
-
ObjectSerializer
Constructor required by Ehcache 3's serializer contract.- Parameters:
loader- the class loader to use when deserialising objects
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceorg.ehcache.spi.serialization.Serializer<Object>- Throws:
org.ehcache.spi.serialization.SerializerException
-
read
public Object read(ByteBuffer binary) throws ClassNotFoundException, org.ehcache.spi.serialization.SerializerException - Specified by:
readin interfaceorg.ehcache.spi.serialization.Serializer<Object>- Throws:
ClassNotFoundExceptionorg.ehcache.spi.serialization.SerializerException
-
equals
public boolean equals(Object object, ByteBuffer binary) throws ClassNotFoundException, org.ehcache.spi.serialization.SerializerException - Specified by:
equalsin interfaceorg.ehcache.spi.serialization.Serializer<Object>- Throws:
ClassNotFoundExceptionorg.ehcache.spi.serialization.SerializerException
-