org.terracotta.cache.serialization
Class DsoSerializationStrategy2<T>
java.lang.Object
org.terracotta.cache.serialization.DsoSerializationStrategy<T>
org.terracotta.cache.serialization.DsoSerializationStrategy2<T>
- Type Parameters:
T - value type
- All Implemented Interfaces:
- SerializationStrategy<T>, SerializationStrategy2<T>, UnsafeSerializationStrategy<T>
- Direct Known Subclasses:
- DsoSerializationStrategy3
public class DsoSerializationStrategy2<T>
- extends DsoSerializationStrategy<T>
- implements SerializationStrategy2<T>
V2 DsoSerializationStrategy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DsoSerializationStrategy2
public DsoSerializationStrategy2()
- Construct a fully locking clusterable serialization strategy.
DsoSerializationStrategy2
public DsoSerializationStrategy2(boolean internalLocking)
- Constructs an optionally locked clusterable serialization strategy.
Non-locked instances can be used to provider tighter over lock scoping, and associated transaction scoping when
serialization strategies are being used within operations that are intended to be atomic.
- Parameters:
internalLocking - true if internal locking should be applied
generateStringKeyFor
public String generateStringKeyFor(Object key)
throws IOException
- Description copied from interface:
SerializationStrategy
- Convert the given key into a portable
String form.
- Specified by:
generateStringKeyFor in interface SerializationStrategy<T>- Overrides:
generateStringKeyFor in class DsoSerializationStrategy<T>
- Parameters:
key - key to serialize
- Returns:
- a portable
String key
- Throws:
IOException - if serialization fails
deserializeStringKey
public Object deserializeStringKey(String key,
ClassLoader loader)
throws IOException,
ClassNotFoundException
- Description copied from interface:
SerializationStrategy2
- Deserialize a given key object into the "real" key object. This method assumes it is passed Strings created from
generateStringKeyFor() on this class
- Specified by:
deserializeStringKey in interface SerializationStrategy2<T>
- Parameters:
key - key to deserializeloader - classloader to use
- Returns:
- the deserialized key object
- Throws:
IOException
ClassNotFoundException
deserializeStringKey
public Object deserializeStringKey(String key)
throws IOException,
ClassNotFoundException
- Description copied from interface:
SerializationStrategy2
- Deserialize a given key object into the "real" key object. This method assumes it is passed Strings created from
generateStringKeyFor() on this class
- Specified by:
deserializeStringKey in interface SerializationStrategy2<T>
- Parameters:
key - key to deserialize
- Returns:
- the deserialized key object
- Throws:
IOException
ClassNotFoundException
readStringKey
protected Object readStringKey(ObjectInputStream ois)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
Copyright © 2015 Terracotta, Inc.. All Rights Reserved.