com.netflix.astyanax.serializers
Class PrefixedSerializer<P,S>
java.lang.Object
com.netflix.astyanax.serializers.AbstractSerializer<S>
com.netflix.astyanax.serializers.PrefixedSerializer<P,S>
- All Implemented Interfaces:
- Serializer<S>
public class PrefixedSerializer<P,S>
- extends AbstractSerializer<S>
Methods inherited from class com.netflix.astyanax.serializers.AbstractSerializer |
computeInitialHashSize, fromBytes, fromBytesSet, fromString, getComparatorType, getNext, getString, toBytes, toBytesList, toBytesList, toBytesMap, toBytesSet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrefixedSerializer
public PrefixedSerializer(P prefix,
Serializer<P> prefixSerializer,
Serializer<S> suffixSerializer)
toByteBuffer
public ByteBuffer toByteBuffer(S s)
- Description copied from interface:
Serializer
- Extract bytes from the obj of type T
- Specified by:
toByteBuffer
in interface Serializer<S>
- Specified by:
toByteBuffer
in class AbstractSerializer<S>
- Returns:
fromByteBuffer
public S fromByteBuffer(ByteBuffer bytes)
throws SerializationException
- Description copied from interface:
Serializer
- Extract an object of type T from the bytes.
- Specified by:
fromByteBuffer
in interface Serializer<S>
- Specified by:
fromByteBuffer
in class AbstractSerializer<S>
- Returns:
-
- Throws:
SerializationException
fromBytesList
public List<S> fromBytesList(List<ByteBuffer> list)
- Specified by:
fromBytesList
in interface Serializer<S>
- Overrides:
fromBytesList
in class AbstractSerializer<S>
fromBytesMap
public <V> Map<S,V> fromBytesMap(Map<ByteBuffer,V> map)
- Specified by:
fromBytesMap
in interface Serializer<S>
- Overrides:
fromBytesMap
in class AbstractSerializer<S>
Copyright © 2012. All Rights Reserved.