me.prettyprint.cassandra.serializers
Class PrefixedSerializer<P,S>
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<S>
me.prettyprint.cassandra.serializers.PrefixedSerializer<P,S>
- All Implemented Interfaces:
- Serializer<S>
public class PrefixedSerializer<P,S>
- extends AbstractSerializer<S>
| 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)
- 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:
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.