@Override public Object getValue(SerializationStrategy strategy) throws IOException, ClassNotFoundException { return strategy.deserialize(value); } }
@Override public synchronized Object getKey(SerializationStrategy strategy) throws IOException, ClassNotFoundException { if (null == keyDeserialized) { keyDeserialized = strategy.deserialize(keySerialized); } return keyDeserialized; }
@Override public synchronized Object getKey(SerializationStrategy strategy) throws IOException, ClassNotFoundException { if (null == keyDeserialized) { keyDeserialized = strategy.deserialize(keySerialized); } return keyDeserialized; } }
/** * 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 strategy.deserialize(getValue()); }
/** * 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 strategy.deserialize(getValue()); }
public T getDeserializedValueCopy(final SerializationStrategy<T> strategy, ClassLoader classLoader) throws IOException, ClassNotFoundException { return strategy.deserialize(getValue(), classLoader); }
private Object getKeyFromDMI(Object key) throws CacheException { switch (valueMode) { case IDENTITY: return key; case SERIALIZATION: try { return dsoSerialization.deserialize((byte[]) key); } catch (Exception e) { throw new CacheException("Unexpected error while deserializing a key from a DMI call.", e); } } throw new UnsupportedOperationException("Value mode " + valueMode + " isn't supported"); }
public T getDeserializedValueCopy(final SerializationStrategy<T> strategy) throws IOException, ClassNotFoundException { return strategy.deserialize(getValue()); }
/** * Return a new copy of this entry, newly deserialized from the serialized state, using a specific classloader. * * @param strategy deserialization strategy * @param classLoader loader to use during deserialization * @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, final ClassLoader classLoader) throws IOException, ClassNotFoundException { return strategy.deserialize(getValue(), classLoader); }
/** * Return a new copy of this entry, newly deserialized from the serialized state, using a specific classloader. * * @param strategy deserialization strategy * @param classLoader loader to use during deserialization * @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, final ClassLoader classLoader) throws IOException, ClassNotFoundException { return strategy.deserialize(getValue(), classLoader); }
/** * Return a new copy of this entry, newly deserialized from the serialized state, using a specific classloader. * * @param strategy deserialization strategy * @param classLoader loader to use during deserialization * @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, final ClassLoader classLoader) throws IOException, ClassNotFoundException { return strategy.deserialize(getValue(), classLoader); }
public synchronized T getDeserializedValue(final SerializationStrategy<T> strategy, ClassLoader classLoader) throws IOException, ClassNotFoundException { if (cached == null) { cached = strategy.deserialize(getValue(), classLoader); nullByteArray(); } return cached; }
public synchronized T getDeserializedValue(final SerializationStrategy<T> strategy) throws IOException, ClassNotFoundException { if (cached == null) { cached = strategy.deserialize(getValue()); nullByteArray(); } return cached; }
/** * Return a copy of this entry, potentially reusing a cached copy. * * @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 synchronized T getDeserializedValue(final SerializationStrategy<T> strategy) throws IOException, ClassNotFoundException { if (this.cached == null) { this.cached = strategy.deserialize(getValue()); nullByteArray(); } return this.cached; }
/** * Return a copy of this entry, potentially reusing a cached copy, using the specified classloader if required. * * @param strategy deserialization strategy * @param classLoader loader to use during deserialization * @return a newly deserialized entry * @throws IOException if de-serialization fails * @throws ClassNotFoundException if a necessary class definition is missing */ public synchronized T getDeserializedValue(final SerializationStrategy<T> strategy, final ClassLoader classLoader) throws IOException, ClassNotFoundException { if (this.cached == null) { this.cached = strategy.deserialize(getValue(), classLoader); nullByteArray(); } return this.cached; }
/** * Return a copy of this entry, potentially reusing a cached copy. * * @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 synchronized T getDeserializedValue(final SerializationStrategy<T> strategy) throws IOException, ClassNotFoundException { if (this.cached == null) { this.cached = strategy.deserialize(getValue()); nullByteArray(); } return this.cached; }
/** * Return a copy of this entry, potentially reusing a cached copy, using the specified classloader if required. * * @param strategy deserialization strategy * @param classLoader loader to use during deserialization * @return a newly deserialized entry * @throws IOException if de-serialization fails * @throws ClassNotFoundException if a necessary class definition is missing */ public synchronized T getDeserializedValue(final SerializationStrategy<T> strategy, final ClassLoader classLoader) throws IOException, ClassNotFoundException { if (this.cached == null) { this.cached = strategy.deserialize(getValue(), classLoader); nullByteArray(); } return this.cached; }
/** * Return a copy of this entry, potentially reusing a cached copy, using the specified classloader if required. * * @param strategy deserialization strategy * @param classLoader loader to use during deserialization * @return a newly deserialized entry * @throws IOException if de-serialization fails * @throws ClassNotFoundException if a necessary class definition is missing */ public synchronized T getDeserializedValue(final SerializationStrategy<T> strategy, final ClassLoader classLoader) throws IOException, ClassNotFoundException { if (this.cached == null) { this.cached = strategy.deserialize(getValue()); nullByteArrayIfNecessary(); } return this.cached; }
private Element getElementFromDMI(Object key, Object element) throws CacheException { AbstractElementData elementData; switch (valueMode) { case IDENTITY: elementData = (AbstractElementData) element; break; case SERIALIZATION: try { elementData = (AbstractElementData) elementSerialization.deserialize((byte[]) element); } catch (Exception e) { throw new CacheException("Unexpected error while deserializing an element from a DMI call.", e); } break; default: throw new UnsupportedOperationException("Value mode " + valueMode + " isn't supported"); } return elementData.createElement(getKeyFromDMI(key)); }