public class SetType<T> extends CollectionType<java.util.Set<T>>
CollectionType.Kind
AbstractType.ComparisonType
AssignmentTestable.TestResult
cellPathSerializer, kind
comparatorSet, comparisonType, isByteOrderComparable, reverseComparator
Constructor and Description |
---|
SetType(AbstractType<T> elements,
boolean isMultiCell) |
Modifier and Type | Method and Description |
---|---|
<VL,VR> int |
compareCustom(VL left,
ValueAccessor<VL> accessorL,
VR right,
ValueAccessor<VR> 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
|
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.
|
AbstractType<T> |
getElementsType() |
static <T> SetType<T> |
getInstance(AbstractType<T> elements,
boolean isMultiCell) |
static SetType<?> |
getInstance(TypeParser parser) |
SetSerializer<T> |
getSerializer() |
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<T> |
nameComparator() |
<V> boolean |
referencesUserType(V name,
ValueAccessor<V> 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<?> |
valueComparator() |
SetType<?> |
withUpdatedUserType(UserType udt)
Returns an instance of this type with all references to the provided user type recursively replaced with its new
definition.
|
asCQL3Type, collectionSize, equals, fromString, getString, isCollection, isCompatibleWith, isFreezable, isMap, isValueCompatibleWithInternal, makeCollectionReceiver, serializeForNativeProtocol, toString, validateCellValue
asCQLTypeStringList, checkComparable, compare, compare, compareCollectionMembers, compareForCQL, compose, compose, decompose, getComponents, getString, getString, isCounter, isEmptyValueMeaningless, isFrozenCollection, isReversed, isTuple, isUDT, isValueCompatibleWith, parseDefaultParameters, read, readArray, readBuffer, readBuffer, referencesDuration, referencesUserType, skipValue, testAssignment, testAssignment, toJSONString, validate, validate, validateCollectionMember, valueLengthIfFixed, writeValue, writeValue, writtenLength, writtenLength
public SetType(AbstractType<T> elements, boolean isMultiCell)
public static SetType<?> getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public static <T> SetType<T> getInstance(AbstractType<T> elements, boolean isMultiCell)
public <V> boolean referencesUserType(V name, ValueAccessor<V> accessor)
referencesUserType
in class AbstractType<java.util.Set<T>>
public SetType<?> withUpdatedUserType(UserType udt)
AbstractType
withUpdatedUserType
in class AbstractType<java.util.Set<T>>
public AbstractType<?> expandUserTypes()
AbstractType
expandUserTypes
in class AbstractType<java.util.Set<T>>
public AbstractType<T> getElementsType()
public AbstractType<T> nameComparator()
nameComparator
in class CollectionType<java.util.Set<T>>
public AbstractType<?> valueComparator()
valueComparator
in class CollectionType<java.util.Set<T>>
public boolean isMultiCell()
isMultiCell
in class AbstractType<java.util.Set<T>>
public AbstractType<?> freeze()
freeze
in class AbstractType<java.util.Set<T>>
public java.util.List<AbstractType<?>> subTypes()
subTypes
in class AbstractType<java.util.Set<T>>
public AbstractType<?> freezeNestedMulticellTypes()
AbstractType
2.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.Set<T>>
public boolean isCompatibleWithFrozen(CollectionType<?> previous)
CollectionType
isCompatibleWithFrozen
in class CollectionType<java.util.Set<T>>
public boolean isValueCompatibleWithFrozen(CollectionType<?> previous)
CollectionType
isValueCompatibleWithFrozen
in class CollectionType<java.util.Set<T>>
public <VL,VR> int compareCustom(VL left, ValueAccessor<VL> accessorL, VR right, ValueAccessor<VR> accessorR)
AbstractType
compareCustom
in class AbstractType<java.util.Set<T>>
public SetSerializer<T> getSerializer()
getSerializer
in class CollectionType<java.util.Set<T>>
public java.lang.String toString(boolean ignoreFreezing)
toString
in class AbstractType<java.util.Set<T>>
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.Set<T>>
public Term fromJSONObject(java.lang.Object parsed) throws MarshalException
AbstractType
fromJSONObject
in class AbstractType<java.util.Set<T>>
parsed
- the result of parsing a json stringMarshalException
public java.lang.String toJSONString(java.nio.ByteBuffer buffer, ProtocolVersion protocolVersion)
AbstractType
The buffer position will stay the same.
toJSONString
in class AbstractType<java.util.Set<T>>
buffer
- the value to convertprotocolVersion
- the protocol version to use for the conversionCopyright © 2009-2022 The Apache Software Foundation