com.netflix.astyanax.serializers
Class MapSerializer<K,V>

java.lang.Object
  extended by com.netflix.astyanax.serializers.AbstractSerializer<java.util.Map<K,V>>
      extended by com.netflix.astyanax.serializers.MapSerializer<K,V>
Type Parameters:
K - key type
V - value type
All Implemented Interfaces:
Serializer<java.util.Map<K,V>>

public class MapSerializer<K,V>
extends AbstractSerializer<java.util.Map<K,V>>

Serializer implementation for generic maps.


Constructor Summary
MapSerializer(org.apache.cassandra.db.marshal.AbstractType<K> key, org.apache.cassandra.db.marshal.AbstractType<V> value)
           
 
Method Summary
 java.util.Map<K,V> fromByteBuffer(java.nio.ByteBuffer arg0)
          Extract an object of type T from the bytes.
 java.nio.ByteBuffer toByteBuffer(java.util.Map<K,V> arg0)
          Extract bytes from the obj of type T
 
Methods inherited from class com.netflix.astyanax.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, fromString, getComparatorType, getNext, getString, toBytes, toBytesList, toBytesList, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapSerializer

public MapSerializer(org.apache.cassandra.db.marshal.AbstractType<K> key,
                     org.apache.cassandra.db.marshal.AbstractType<V> value)
Parameters:
key -
value -
Method Detail

fromByteBuffer

public java.util.Map<K,V> fromByteBuffer(java.nio.ByteBuffer arg0)
Description copied from interface: Serializer
Extract an object of type T from the bytes.

Specified by:
fromByteBuffer in interface Serializer<java.util.Map<K,V>>
Specified by:
fromByteBuffer in class AbstractSerializer<java.util.Map<K,V>>
Returns:

toByteBuffer

public java.nio.ByteBuffer toByteBuffer(java.util.Map<K,V> arg0)
Description copied from interface: Serializer
Extract bytes from the obj of type T

Specified by:
toByteBuffer in interface Serializer<java.util.Map<K,V>>
Specified by:
toByteBuffer in class AbstractSerializer<java.util.Map<K,V>>
Returns: