Search in sources :

Example 16 with Serializer

use of voldemort.serialization.Serializer in project voldemort by voldemort.

the class VoldemortClientShell method serializeKey.

protected byte[] serializeKey(Object key) {
    SerializerFactory serializerFactory = factory.getSerializerFactory();
    SerializerDefinition serializerDef = storeDef.getKeySerializer();
    Serializer<Object> keySerializer = (Serializer<Object>) serializerFactory.getSerializer(serializerDef);
    return keySerializer.toBytes(key);
}
Also used : SerializerFactory(voldemort.serialization.SerializerFactory) SerializerDefinition(voldemort.serialization.SerializerDefinition) Serializer(voldemort.serialization.Serializer)

Aggregations

Serializer (voldemort.serialization.Serializer)16 DefaultSerializerFactory (voldemort.serialization.DefaultSerializerFactory)10 ByteArray (voldemort.utils.ByteArray)10 SerializerDefinition (voldemort.serialization.SerializerDefinition)9 StoreDefinition (voldemort.store.StoreDefinition)9 Node (voldemort.cluster.Node)8 SerializerFactory (voldemort.serialization.SerializerFactory)7 Versioned (voldemort.versioning.Versioned)7 File (java.io.File)6 StringSerializer (voldemort.serialization.StringSerializer)6 CompressionStrategyFactory (voldemort.store.compress.CompressionStrategyFactory)6 IOException (java.io.IOException)5 HashMap (java.util.HashMap)5 BufferedWriter (java.io.BufferedWriter)4 Map (java.util.Map)4 RoutingStrategyFactory (voldemort.routing.RoutingStrategyFactory)4 CompressionStrategy (voldemort.store.compress.CompressionStrategy)4 Pair (voldemort.utils.Pair)4 StringReader (java.io.StringReader)3 ArrayList (java.util.ArrayList)3