org.ehcache.spi.serialization
Interface SerializationProvider

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultJsr107SerializationProvider, DefaultSerializationProvider

public interface SerializationProvider
extends Service

Contract to provide a Serializer for a given type.


Method Summary
<T> Serializer<T>
createKeySerializer(java.lang.Class<T> clazz, java.lang.ClassLoader classLoader, ServiceConfiguration<?>... configs)
          Creates a key Serializer with the given parameters.
<T> Serializer<T>
createValueSerializer(java.lang.Class<T> clazz, java.lang.ClassLoader classLoader, ServiceConfiguration<?>... configs)
          Creates a value Serializer with the given parameters.
 
Methods inherited from interface org.ehcache.spi.service.Service
start, stop
 

Method Detail

createKeySerializer

<T> Serializer<T> createKeySerializer(java.lang.Class<T> clazz,
                                      java.lang.ClassLoader classLoader,
                                      ServiceConfiguration<?>... configs)
Creates a key Serializer with the given parameters.

Type Parameters:
T - the type serialized to serialize to/from
Parameters:
clazz - the class of the type to serialize to/from
classLoader - the classloader to use
configs - specific configuration
Returns:
a Serializer instance

createValueSerializer

<T> Serializer<T> createValueSerializer(java.lang.Class<T> clazz,
                                        java.lang.ClassLoader classLoader,
                                        ServiceConfiguration<?>... configs)
Creates a value Serializer with the given parameters.

Type Parameters:
T - the type serialized to serialize to/from
Parameters:
clazz - the class of the type to serialize to/from
classLoader - the classloader to use
configs - specific configuration
Returns:
a Serializer instance