org.apache.cassandra.db.composites

## Class AbstractCellNameType

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

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

      public abstract class AbstractCellNameType
      extends AbstractCType
      implements CellNameType

- - ### Nested Class Summary

    - ### 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 inherited from class org.apache.cassandra.db.composites.AbstractCType

      `isByteOrderComparable`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractCellNameType(boolean isByteOrderComparable)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `java.util.Comparator<java.lang.Object>` | `asymmetricColumnComparator(boolean isRightNative)`
    `CellName` | `cellFromByteBuffer(java.nio.ByteBuffer bytes)` Deserialize a Composite from a ByteBuffer.
    `ISerializer<CellName>` | `cellSerializer()`
    `ColumnToCollectionType` | `collectionType()` The type of the collections (or null if the type does not have any non-frozen collections).
    `java.util.Comparator<Cell>` | `columnComparator(boolean isRightNative)`
    `java.util.Comparator<Cell>` | `columnReverseComparator()`
    `ColumnSerializer` | `columnSerializer()`
    `CellName` | `create(Composite prefix, ColumnDefinition column, java.nio.ByteBuffer collectionElement)` Creates a new collection CellName given a clustering prefix, a CQL3 column and the collection element.
    `IVersionedSerializer<IDiskAtomFilter>` | `diskAtomFilterSerializer()`
    `boolean` | `hasCollections()` Whether or not there is some collections defined in this type.
    `Composite` | `make(java.lang.Object... components)` Convenience method to build composites from their component.
    `protected abstract CellName` | `makeCellName(java.nio.ByteBuffer[] components)`
    `CellName` | `makeCellName(java.lang.Object... components)` Convenience method to create cell names given its components.
    `protected static CQL3Row.Builder` | `makeDenseCQL3RowBuilder(long now)`
    `protected static CQL3Row.Builder` | `makeSparseCQL3RowBuilder(CFMetaData cfMetaData, CellNameType type, long now)`
    `IVersionedSerializer<NamesQueryFilter>` | `namesQueryFilterSerializer()`
    `java.util.Comparator<OnDiskAtom>` | `onDiskAtomComparator()`
    `OnDiskAtom.Serializer` | `onDiskAtomSerializer()`
    `CellName` | `rowMarker(Composite prefix)` Creates a row marker for the CQL3 having the provided clustering prefix.
    `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.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.CellNameType

      `addCQL3Column, clusteringPrefixSize, CQL3RowBuilder, create, isDense, newDeserializer, prefixBuilder, removeCQL3Column, setSubtype`

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

      `asAbstractType, builder, compare, deletionInfoSerializer, fromByteBuffer, getString, indexComparator, indexReverseComparator, isCompatibleWith, isCompound, rangeTombstoneSerializer, reverseComparator, serializer, size, sliceQueryFilterSerializer, sliceSerializer, subtype, 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`

- - ### Constructor Detail

    - #### AbstractCellNameType

          protected AbstractCellNameType(boolean isByteOrderComparable)

  - ### Method Detail

    - #### columnComparator

          public final java.util.Comparator<Cell> columnComparator(boolean isRightNative)

      Specified by:
        `columnComparator` in interface `CellNameType`

    - #### asymmetricColumnComparator

          public final java.util.Comparator<java.lang.Object> asymmetricColumnComparator(boolean isRightNative)

      Specified by:
        `asymmetricColumnComparator` in interface `CellNameType`

    - #### columnReverseComparator

          public java.util.Comparator<Cell> columnReverseComparator()

      Specified by:
        `columnReverseComparator` in interface `CellNameType`

    - #### onDiskAtomComparator

          public java.util.Comparator<OnDiskAtom> onDiskAtomComparator()

      Specified by:
        `onDiskAtomComparator` in interface `CellNameType`

    - #### cellSerializer

          public ISerializer<CellName> cellSerializer()

      Specified by:
        `cellSerializer` in interface `CellNameType`

    - #### columnSerializer

          public ColumnSerializer columnSerializer()

      Specified by:
        `columnSerializer` in interface `CellNameType`

    - #### onDiskAtomSerializer

          public OnDiskAtom.Serializer onDiskAtomSerializer()

      Specified by:
        `onDiskAtomSerializer` in interface `CellNameType`

    - #### namesQueryFilterSerializer

          public IVersionedSerializer<NamesQueryFilter> namesQueryFilterSerializer()

      Specified by:
        `namesQueryFilterSerializer` in interface `CellNameType`

    - #### diskAtomFilterSerializer

          public IVersionedSerializer<IDiskAtomFilter> diskAtomFilterSerializer()

      Specified by:
        `diskAtomFilterSerializer` in interface `CellNameType`

    - #### cellFromByteBuffer

          public CellName cellFromByteBuffer(java.nio.ByteBuffer bytes)

      Description copied from interface: `CellNameType`
      Deserialize a Composite from a ByteBuffer. This is equilvalent to CType#fromByteBuffer but assumes the buffer is a full cell name. This is meant for thrift to convert the fully serialized buffer we get from the clients.
      Specified by:
        `cellFromByteBuffer` in interface `CellNameType`

    - #### create

          public CellName create(Composite prefix,
                                 ColumnDefinition column,
                                 java.nio.ByteBuffer collectionElement)

      Description copied from interface: `CellNameType`
      Creates a new collection CellName given a clustering prefix, a CQL3 column and the collection element.
      Specified by:
        `create` in interface `CellNameType`

    - #### 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`

    - #### 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`

    - #### hasCollections

          public boolean hasCollections()

      Description copied from interface: `CellNameType`
      Whether or not there is some collections defined in this type.
      Specified by:
        `hasCollections` in interface `CellNameType`

    - #### supportCollections

          public boolean supportCollections()

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

    - #### collectionType

          public ColumnToCollectionType collectionType()

      Description copied from interface: `CellNameType`
      The type of the collections (or null if the type does not have any non-frozen collections).
      Specified by:
        `collectionType` in interface `CellNameType`

    - #### 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`

    - #### make

          public Composite make(java.lang.Object... components)

      Description copied from interface: `CType`
      Convenience method to build composites from their component. The arguments can be either ByteBuffer or actual objects of the type corresponding to their position.
      Specified by:
        `make` in interface `CType`
      Overrides:
        `make` in class `AbstractCType`

    - #### makeCellName

          public CellName makeCellName(java.lang.Object... components)

      Description copied from interface: `CellNameType`
      Convenience method to create cell names given its components. This is equivalent to CType#make() but return a full cell name (and thus require all the components of the name).
      Specified by:
        `makeCellName` in interface `CellNameType`

    - #### makeCellName

          protected abstract CellName makeCellName(java.nio.ByteBuffer[] components)

    - #### makeDenseCQL3RowBuilder

          protected static CQL3Row.Builder makeDenseCQL3RowBuilder(long now)

    - #### makeSparseCQL3RowBuilder

          protected static CQL3Row.Builder makeSparseCQL3RowBuilder(CFMetaData cfMetaData,
                                                                    CellNameType type,
                                                                    long now)

Copyright © 2018 The Apache Software Foundation