public class MapType<K,V> extends CollectionType<java.util.Map<K,V>>
CollectionType.Kind
Modifier and Type | Field and Description |
---|---|
AbstractType<K> |
keys |
AbstractType<V> |
values |
kind, MAX_ELEMENTS
columnComparator, columnReverseComparator, indexComparator, indexReverseComparator, onDiskAtomComparator, reverseComparator
Modifier and Type | Method and Description |
---|---|
protected void |
appendToStringBuilder(java.lang.StringBuilder sb) |
java.util.Map<K,V> |
compose(java.nio.ByteBuffer bytes) |
java.nio.ByteBuffer |
decompose(java.util.Map<K,V> value)
Layout is:
<n><sk_1><k_1><sv_1><v_1>...<sk_n><k_n><sv_n><v_n>
where:
n is the number of elements
sk_i is the number of bytes composing the ith key k_i
k_i is the sk_i bytes composing the ith key
sv_i is the number of bytes composing the ith value v_i
v_i is the sv_i bytes composing the ith value |
static <K,V> MapType<K,V> |
getInstance(AbstractType<K> keys,
AbstractType<V> values) |
static MapType<?,?> |
getInstance(TypeParser parser) |
AbstractType<K> |
nameComparator() |
java.nio.ByteBuffer |
serialize(java.util.List<Pair<java.nio.ByteBuffer,IColumn>> columns)
Creates the same output than decompose, but from the internal representation.
|
AbstractType<V> |
valueComparator() |
asCQL3Type, compare, enforceLimit, fromString, getString, getUnsignedShort, isCollection, pack, pack, toString, validate
compareCollectionMembers, fromStringCQL2, getColumnsString, getReverseComparator, getString, isCommutative, isCompatibleWith, isValueCompatibleWith, parseDefaultParameters, validateCollectionMember
public final AbstractType<K> keys
public final AbstractType<V> values
public static MapType<?,?> getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public static <K,V> MapType<K,V> getInstance(AbstractType<K> keys, AbstractType<V> values)
public AbstractType<K> nameComparator()
nameComparator
in class CollectionType<java.util.Map<K,V>>
public AbstractType<V> valueComparator()
valueComparator
in class CollectionType<java.util.Map<K,V>>
public java.util.Map<K,V> compose(java.nio.ByteBuffer bytes)
compose
in class AbstractType<java.util.Map<K,V>>
public java.nio.ByteBuffer decompose(java.util.Map<K,V> value)
<n><sk_1><k_1><sv_1><v_1>...<sk_n><k_n><sv_n><v_n>
where:
n is the number of elements
sk_i is the number of bytes composing the ith key k_i
k_i is the sk_i bytes composing the ith key
sv_i is the number of bytes composing the ith value v_i
v_i is the sv_i bytes composing the ith valuedecompose
in class AbstractType<java.util.Map<K,V>>
protected void appendToStringBuilder(java.lang.StringBuilder sb)
appendToStringBuilder
in class CollectionType<java.util.Map<K,V>>
Copyright © 2014 The Apache Software Foundation