public class MapType<K,V> extends CollectionType<java.util.Map<K,V>>
CollectionType.KindAbstractType.ComparisonTypeAssignmentTestable.TestResultcellPathSerializer, kindcomparatorSet, comparisonType, isByteOrderComparable, reverseComparator| Modifier and Type | Method and Description |
|---|---|
protected int |
collectionSize(java.util.List<java.nio.ByteBuffer> values) |
<RL,TR> int |
compareCustom(RL left,
ValueAccessor<RL> accessorL,
TR right,
ValueAccessor<TR> accessorR)
Implement IFF ComparisonType is CUSTOM
Compares the byte representation of two instances of this class,
for types where this cannot be done by simple in-order comparison of the
unsigned bytes
Standard Java compare semantics
|
static <TL,TR> int |
compareMaps(AbstractType<?> keysComparator,
AbstractType<?> valuesComparator,
TL left,
ValueAccessor<TL> accessorL,
TR right,
ValueAccessor<TR> accessorR) |
AbstractType<?> |
expandUserTypes()
Replace any instances of UserType with equivalent TupleType-s.
|
AbstractType<?> |
freeze() |
AbstractType<?> |
freezeNestedMulticellTypes()
Returns an AbstractType instance that is equivalent to this one, but with all nested UDTs and collections
explicitly frozen.
|
Term |
fromJSONObject(java.lang.Object parsed)
Given a parsed JSON string, return a byte representation of the object.
|
static <K,V> MapType<K,V> |
getInstance(AbstractType<K> keys,
AbstractType<V> values,
boolean isMultiCell) |
static MapType<?,?> |
getInstance(TypeParser parser) |
AbstractType<K> |
getKeysType() |
MapSerializer<K,V> |
getSerializer() |
AbstractType<V> |
getValuesType() |
boolean |
isCompatibleWithFrozen(CollectionType<?> previous)
A version of isCompatibleWith() to deal with non-multicell (frozen) collections
|
boolean |
isMultiCell() |
boolean |
isValueCompatibleWithFrozen(CollectionType<?> previous)
A version of isValueCompatibleWith() to deal with non-multicell (frozen) collections
|
AbstractType<K> |
nameComparator() |
boolean |
referencesDuration() |
<T> boolean |
referencesUserType(T name,
ValueAccessor<T> accessor) |
java.util.List<java.nio.ByteBuffer> |
serializedValues(java.util.Iterator<Cell<?>> cells) |
java.util.List<AbstractType<?>> |
subTypes() |
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
ProtocolVersion protocolVersion)
Converts the specified value into its JSON representation.
|
java.lang.String |
toString(boolean ignoreFreezing) |
AbstractType<V> |
valueComparator() |
MapType<?,?> |
withUpdatedUserType(UserType udt)
Returns an instance of this type with all references to the provided user type recursively replaced with its new
definition.
|
asCQL3Type, equals, fromString, getString, isCollection, isCompatibleWith, isFreezable, isMap, isValueCompatibleWithInternal, makeCollectionReceiver, serializeForNativeProtocol, toString, validateCellValueasCQLTypeStringList, checkComparable, compare, compare, compareCollectionMembers, compareForCQL, compose, compose, decompose, getComponents, getString, getString, isCounter, isEmptyValueMeaningless, isFrozenCollection, isReversed, isTuple, isUDT, isValueCompatibleWith, parseDefaultParameters, read, readArray, readBuffer, readBuffer, referencesUserType, skipValue, testAssignment, testAssignment, toJSONString, validate, validate, validateCollectionMember, valueLengthIfFixed, writeValue, writeValue, writtenLength, writtenLengthpublic static MapType<?,?> getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public static <K,V> MapType<K,V> getInstance(AbstractType<K> keys, AbstractType<V> values, boolean isMultiCell)
public <T> boolean referencesUserType(T name,
ValueAccessor<T> accessor)
referencesUserType in class AbstractType<java.util.Map<K,V>>public MapType<?,?> withUpdatedUserType(UserType udt)
AbstractTypewithUpdatedUserType in class AbstractType<java.util.Map<K,V>>public AbstractType<?> expandUserTypes()
AbstractTypeexpandUserTypes in class AbstractType<java.util.Map<K,V>>public boolean referencesDuration()
referencesDuration in class AbstractType<java.util.Map<K,V>>public AbstractType<K> getKeysType()
public AbstractType<V> getValuesType()
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 boolean isMultiCell()
isMultiCell in class AbstractType<java.util.Map<K,V>>public java.util.List<AbstractType<?>> subTypes()
subTypes in class AbstractType<java.util.Map<K,V>>public AbstractType<?> freeze()
freeze in class AbstractType<java.util.Map<K,V>>public AbstractType<?> freezeNestedMulticellTypes()
AbstractType2.x -> 3.x schema migrations, and can be removed in Cassandra 4.0.
See CASSANDRA-11609 and CASSANDRA-11613.freezeNestedMulticellTypes in class AbstractType<java.util.Map<K,V>>public boolean isCompatibleWithFrozen(CollectionType<?> previous)
CollectionTypeisCompatibleWithFrozen in class CollectionType<java.util.Map<K,V>>public boolean isValueCompatibleWithFrozen(CollectionType<?> previous)
CollectionTypeisValueCompatibleWithFrozen in class CollectionType<java.util.Map<K,V>>public <RL,TR> int compareCustom(RL left,
ValueAccessor<RL> accessorL,
TR right,
ValueAccessor<TR> accessorR)
AbstractTypecompareCustom in class AbstractType<java.util.Map<K,V>>public static <TL,TR> int compareMaps(AbstractType<?> keysComparator, AbstractType<?> valuesComparator, TL left, ValueAccessor<TL> accessorL, TR right, ValueAccessor<TR> accessorR)
public MapSerializer<K,V> getSerializer()
getSerializer in class CollectionType<java.util.Map<K,V>>protected int collectionSize(java.util.List<java.nio.ByteBuffer> values)
collectionSize in class CollectionType<java.util.Map<K,V>>public java.lang.String toString(boolean ignoreFreezing)
toString in class AbstractType<java.util.Map<K,V>>ignoreFreezing - if true, the type string will not be wrapped with FrozenType(...), even if this type is frozen.public java.util.List<java.nio.ByteBuffer> serializedValues(java.util.Iterator<Cell<?>> cells)
serializedValues in class CollectionType<java.util.Map<K,V>>public Term fromJSONObject(java.lang.Object parsed) throws MarshalException
AbstractTypefromJSONObject in class AbstractType<java.util.Map<K,V>>parsed - the result of parsing a json stringMarshalExceptionpublic java.lang.String toJSONString(java.nio.ByteBuffer buffer,
ProtocolVersion protocolVersion)
AbstractTypeThe buffer position will stay the same.
toJSONString in class AbstractType<java.util.Map<K,V>>buffer - the value to convertprotocolVersion - the protocol version to use for the conversionCopyright © 2009-2022 The Apache Software Foundation