CompoundSparseCellNameType (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.db.composites

## Class CompoundSparseCellNameType

- java.lang.Object
- - org.apache.cassandra.db.composites.AbstractCType
  - - org.apache.cassandra.db.composites.AbstractCellNameType
    - - org.apache.cassandra.db.composites.AbstractCompoundCellNameType
      - - org.apache.cassandra.db.composites.CompoundSparseCellNameType

- All Implemented Interfaces:
    java.util.Comparator<Composite>, CellNameType, CType
  Direct Known Subclasses:
    CompoundSparseCellNameType.WithCollection

      public class CompoundSparseCellNameType
      extends AbstractCompoundCellNameType

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CompoundSparseCellNameType.WithCollection`

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.db.composites.CellNameType

      `CellNameType.Deserializer`

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.db.composites.CType

      `CType.Serializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<java.nio.ByteBuffer,ColumnIdentifier>` | `internedIds`
    `static ColumnIdentifier` | `rowMarkerId`

    - ### Fields inherited from class org.apache.cassandra.db.composites.AbstractCompoundCellNameType

      `clusteringSize, clusteringType, fullSize, fullType`

    - ### Fields inherited from class org.apache.cassandra.db.composites.AbstractCType

      `isByteOrderComparable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompoundSparseCellNameType(java.util.List<AbstractType<?>> types)`
    `CompoundSparseCellNameType(java.util.List<AbstractType<?>> types, AbstractType<?> columnNameType)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCQL3Column(ColumnIdentifier id)`
    `CellNameType` | `addOrUpdateCollection(ColumnIdentifier columnName, CollectionType newCollection)` Return the new type obtained by adding/updating to the new collection type for the provided column name to this type.
    `protected Composite` | `copyAndMakeWith(java.nio.ByteBuffer[] components, int size, Composite.EOC eoc, boolean isStatic)`
    `CQL3Row.Builder` | `CQL3RowBuilder(CFMetaData metadata, long now)` Creates a new CQL3Row builder for this type.
    `CellName` | `create(Composite prefix, ColumnDefinition column)` Creates a new CellName given a clustering prefix and a CQL3 column.
    `protected ColumnIdentifier` | `idFor(java.nio.ByteBuffer bb)`
    `boolean` | `isDense()` Whether or not the cell names for this type are dense.
    `protected static CompoundCType` | `makeCType(CompoundCType clusteringType, AbstractType<?> columnNameType, ColumnToCollectionType collectionType)`
    `protected Composite` | `makeWith(java.nio.ByteBuffer[] components, int size, Composite.EOC eoc, boolean isStatic)`
    `void` | `removeCQL3Column(ColumnIdentifier id)`
    `CellName` | `rowMarker(Composite prefix)` Creates a row marker for the CQL3 having the provided clustering prefix.
    `CellNameType` | `setSubtype(int position, AbstractType<?> newType)` Returns a new CellNameType that is equivalent to this one but with one of the subtype replaced by the provided new type.
    `Composite` | `staticPrefix()` The prefix to use for static columns.
    `boolean` | `supportCollections()` Whether or not this type layout support collections.

    - ### Methods inherited from class org.apache.cassandra.db.composites.AbstractCompoundCellNameType

      `asAbstractType, builder, clusteringPrefixSize, fromByteBuffer, isCompound, makeCellName, newDeserializer, prefixBuilder, size, subtype`

    - ### Methods inherited from class org.apache.cassandra.db.composites.AbstractCellNameType

      `asymmetricColumnComparator, cellFromByteBuffer, cellSerializer, collectionType, columnComparator, columnReverseComparator, columnSerializer, create, diskAtomFilterSerializer, hasCollections, make, makeCellName, makeDenseCQL3RowBuilder, makeSparseCQL3RowBuilder, namesQueryFilterSerializer, onDiskAtomComparator, onDiskAtomSerializer`

    - ### Methods inherited from class org.apache.cassandra.db.composites.AbstractCType

      `checkRemaining, compare, deletionInfoSerializer, equals, getByteOrderAsymmetricColumnComparator, getByteOrderColumnComparator, getString, hashCode, indexComparator, indexReverseComparator, isByteOrderComparable, isCompatibleWith, rangeTombstoneSerializer, reverseComparator, serializer, sliceBytes, sliceQueryFilterSerializer, sliceSerializer, toString, validate`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.cassandra.db.composites.CType

      `compare, deletionInfoSerializer, getString, indexComparator, indexReverseComparator, isCompatibleWith, rangeTombstoneSerializer, reverseComparator, serializer, sliceQueryFilterSerializer, sliceSerializer, validate`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Field Detail

    - #### rowMarkerId

          public static final ColumnIdentifier rowMarkerId

    - #### internedIds

          protected final java.util.Map<java.nio.ByteBuffer,ColumnIdentifier> internedIds

  - ### Constructor Detail

    - #### CompoundSparseCellNameType

          public CompoundSparseCellNameType(java.util.List<AbstractType<?>> types)

    - #### CompoundSparseCellNameType

          public CompoundSparseCellNameType(java.util.List<AbstractType<?>> types,
                                            AbstractType<?> columnNameType)

  - ### Method Detail

    - #### makeCType

          protected static CompoundCType makeCType(CompoundCType clusteringType,
                                                   AbstractType<?> columnNameType,
                                                   ColumnToCollectionType collectionType)

    - #### setSubtype

          public CellNameType setSubtype(int position,
                                         AbstractType<?> newType)

      Description copied from interface: `CellNameType`
      Returns a new CellNameType that is equivalent to this one but with one of the subtype replaced by the provided new type.

    - #### addOrUpdateCollection

          public CellNameType addOrUpdateCollection(ColumnIdentifier columnName,
                                                    CollectionType newCollection)

      Description copied from interface: `CellNameType`
      Return the new type obtained by adding/updating to the new collection type for the provided column name to this type.
      Specified by:
        `addOrUpdateCollection` in interface `CellNameType`
      Overrides:
        `addOrUpdateCollection` in class `AbstractCellNameType`

    - #### isDense

          public boolean isDense()

      Description copied from interface: `CellNameType`
      Whether or not the cell names for this type are dense.

    - #### supportCollections

          public boolean supportCollections()

      Description copied from interface: `CellNameType`
      Whether or not this type layout support collections.
      Specified by:
        `supportCollections` in interface `CellNameType`
      Overrides:
        `supportCollections` in class `AbstractCellNameType`

    - #### staticPrefix

          public Composite staticPrefix()

      Description copied from interface: `CellNameType`
      The prefix to use for static columns. Note that create() methods below for creating CellName automatically handle static columns already for convenience, and so there is not need to pass this prefix for them. There is few other cases where we need the prefix directly however.
      Specified by:
        `staticPrefix` in interface `CellNameType`
      Overrides:
        `staticPrefix` in class `AbstractCellNameType`

    - #### create

          public CellName create(Composite prefix,
                                 ColumnDefinition column)

      Description copied from interface: `CellNameType`
      Creates a new CellName given a clustering prefix and a CQL3 column. Note that for dense types, the column can be null as a shortcut for designing the only COMPACT_VALUE column of the table.

    - #### rowMarker

          public CellName rowMarker(Composite prefix)

      Description copied from interface: `CellNameType`
      Creates a row marker for the CQL3 having the provided clustering prefix. Note that this is only valid for CQL3 tables (isCompound() and !isDense()) and should only be called for them.
      Specified by:
        `rowMarker` in interface `CellNameType`
      Overrides:
        `rowMarker` in class `AbstractCellNameType`

    - #### idFor

          protected ColumnIdentifier idFor(java.nio.ByteBuffer bb)

    - #### makeWith

          protected Composite makeWith(java.nio.ByteBuffer[] components,
                                       int size,
                                       Composite.EOC eoc,
                                       boolean isStatic)

      Specified by:
        `makeWith` in class `AbstractCompoundCellNameType`

    - #### copyAndMakeWith

          protected Composite copyAndMakeWith(java.nio.ByteBuffer[] components,
                                              int size,
                                              Composite.EOC eoc,
                                              boolean isStatic)

      Specified by:
        `copyAndMakeWith` in class `AbstractCompoundCellNameType`

    - #### addCQL3Column

          public void addCQL3Column(ColumnIdentifier id)

    - #### removeCQL3Column

          public void removeCQL3Column(ColumnIdentifier id)

    - #### CQL3RowBuilder

          public CQL3Row.Builder CQL3RowBuilder(CFMetaData metadata,
                                                long now)

      Description copied from interface: `CellNameType`
      Creates a new CQL3Row builder for this type. See CQL3Row for details.

Copyright © 2018 The Apache Software Foundation