Class SerializationConversionUtil
java.lang.Object
org.apache.commons.jcs3.utils.serialization.SerializationConversionUtil
This uses a supplied Serializer to convert to and from cache elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> ICacheElement<K, V> getDeSerializedCacheElement
(ICacheElementSerialized<K, V> serialized, IElementSerializer elementSerializer) This returns a wrapper that has a de-serialized version of the value instead of the serialized value.static <K,
V> ICacheElementSerialized<K, V> getSerializedCacheElement
(ICacheElement<K, V> element, IElementSerializer elementSerializer) This returns a wrapper that has a serialized version of the value instead of the value.
-
Constructor Details
-
SerializationConversionUtil
public SerializationConversionUtil()
-
-
Method Details
-
getSerializedCacheElement
public static <K,V> ICacheElementSerialized<K,V> getSerializedCacheElement(ICacheElement<K, V> element, IElementSerializer elementSerializer) throws IOExceptionThis returns a wrapper that has a serialized version of the value instead of the value.- Parameters:
element
-elementSerializer
- the serializer to be used.- Returns:
- null for null;
- Throws:
IOException
-
getDeSerializedCacheElement
public static <K,V> ICacheElement<K,V> getDeSerializedCacheElement(ICacheElementSerialized<K, V> serialized, IElementSerializer elementSerializer) throws IOException, ClassNotFoundExceptionThis returns a wrapper that has a de-serialized version of the value instead of the serialized value.- Parameters:
serialized
-elementSerializer
- the serializer to be used.- Returns:
- null for null;
- Throws:
IOException
ClassNotFoundException
-