/** * Return a new copy of this entry, newly deserialized from the serialized state. * * @param strategy deserialization strategy * @return a newly deserialized entry * @throws IOException if de-serialization fails * @throws ClassNotFoundException if a necessary class definition is missing */ public T getDeserializedValueCopy(final SerializationStrategy<T> strategy) throws IOException, ClassNotFoundException { return getDeserializedValueCopy(strategy, null); }
public Element createElement(final Object key, final TimestampedValue value) { if (null == value) { return null; } SerializedEntry<AbstractElementData> entry = (SerializedEntry<AbstractElementData>) value; AbstractElementData data; try { if (copyOnRead) { data = entry.getDeserializedValueCopy(serializationStrategy, threadContextAwareClassLoader); } else { data = entry.getDeserializedValue(serializationStrategy, threadContextAwareClassLoader); } } catch (Exception e) { throw new CacheException(e); } Element element = data.createElement(key); element.setElementEvictionData(new ClusteredElementEvictionData(store, value)); return element; }