Class ListType<T>

    • Method Detail

      • getInstance

        public static <T> ListType<T> getInstance​(AbstractType<T> elements,
                                                  boolean isMultiCell)
      • withUpdatedUserType

        public ListType<?> withUpdatedUserType​(UserType udt)
        Description copied from class: AbstractType
        Returns an instance of this type with all references to the provided user type recursively replaced with its new definition.
        Overrides:
        withUpdatedUserType in class AbstractType<java.util.List<T>>
      • expandUserTypes

        public AbstractType<?> expandUserTypes()
        Description copied from class: AbstractType
        Replace any instances of UserType with equivalent TupleType-s. We need it for dropped_columns, to allow safely dropping unused user types later without retaining any references to them in system_schema.dropped_columns.
        Overrides:
        expandUserTypes in class AbstractType<java.util.List<T>>
      • freezeNestedMulticellTypes

        public AbstractType<?> freezeNestedMulticellTypes()
        Description copied from class: AbstractType
        Returns an AbstractType instance that is equivalent to this one, but with all nested UDTs and collections explicitly frozen. This is only necessary for 2.x -> 3.x schema migrations, and can be removed in Cassandra 4.0. See CASSANDRA-11609 and CASSANDRA-11613.
        Overrides:
        freezeNestedMulticellTypes in class AbstractType<java.util.List<T>>
      • compareCustom

        public <VL,​VR> int compareCustom​(VL left,
                                               ValueAccessor<VL> accessorL,
                                               VR right,
                                               ValueAccessor<VR> accessorR)
        Description copied from class: AbstractType
        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
        Overrides:
        compareCustom in class AbstractType<java.util.List<T>>
      • toString

        public java.lang.String toString​(boolean ignoreFreezing)
        Overrides:
        toString in class AbstractType<java.util.List<T>>
        Parameters:
        ignoreFreezing - if true, the type string will not be wrapped with FrozenType(...), even if this type is frozen.
      • serializedValues

        public java.util.List<java.nio.ByteBuffer> serializedValues​(java.util.Iterator<Cell<?>> cells)
        Specified by:
        serializedValues in class CollectionType<java.util.List<T>>
      • setOrListToJsonString

        public static java.lang.String setOrListToJsonString​(java.nio.ByteBuffer buffer,
                                                             AbstractType elementsType,
                                                             ProtocolVersion protocolVersion)
      • getSliceFromSerialized

        public java.nio.ByteBuffer getSliceFromSerialized​(java.nio.ByteBuffer collection,
                                                          java.nio.ByteBuffer from,
                                                          java.nio.ByteBuffer to)
      • toJSONString

        public java.lang.String toJSONString​(java.nio.ByteBuffer buffer,
                                             ProtocolVersion protocolVersion)
        Description copied from class: AbstractType
        Converts the specified value into its JSON representation.

        The buffer position will stay the same.

        Overrides:
        toJSONString in class AbstractType<java.util.List<T>>
        Parameters:
        buffer - the value to convert
        protocolVersion - the protocol version to use for the conversion
        Returns:
        a JSON string representing the specified value