org.apache.cassandra.db

## Class LegacyLayout

- java.lang.Object
- - org.apache.cassandra.db.LegacyLayout

-     public abstract class LegacyLayout
      extends java.lang.Object

  Functions to deal with the old format.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LegacyLayout.CellGrouper`
    `static interface` | `LegacyLayout.LegacyAtom`
    `static class` | `LegacyLayout.LegacyBound`
    `static class` | `LegacyLayout.LegacyCell` A legacy cell.
    `static class` | `LegacyLayout.LegacyCellName`
    `static class` | `LegacyLayout.LegacyDeletionInfo`
    `static class` | `LegacyLayout.LegacyRangeTombstone` A legacy range tombstone.
    `static class` | `LegacyLayout.LegacyRangeTombstoneList` Almost an entire copy of RangeTombstoneList from C* 2.1.
    `static class` | `LegacyLayout.LegacyUnfilteredPartition`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `COUNTER_MASK`
    `static int` | `COUNTER_UPDATE_MASK`
    `static int` | `DELETION_MASK`
    `static int` | `EXPIRATION_MASK`
    `static int` | `MAX_CELL_NAME_LENGTH`
    `static int` | `STATIC_PREFIX`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static LegacyLayout.LegacyBound` | `decodeBound(CFMetaData metadata, java.nio.ByteBuffer bound, boolean isStart)`
    `static LegacyLayout.LegacyCellName` | `decodeCellName(CFMetaData metadata, java.nio.ByteBuffer cellname)`
    `static LegacyLayout.LegacyCellName` | `decodeCellName(CFMetaData metadata, java.nio.ByteBuffer cellname, boolean readAllAsDynamic)`
    `static LegacyLayout.LegacyCellName` | `decodeCellName(CFMetaData metadata, java.nio.ByteBuffer superColumnName, java.nio.ByteBuffer cellname)`
    `static Clustering` | `decodeClustering(CFMetaData metadata, java.nio.ByteBuffer value)`
    `static java.util.Iterator<LegacyLayout.LegacyCell>` | `deserializeCells(CFMetaData metadata, java.io.DataInput in, SerializationHelper.Flag flag, int size)`
    `static UnfilteredRowIterator` | `deserializeLegacyPartition(DataInputPlus in, int version, SerializationHelper.Flag flag, java.nio.ByteBuffer key)`
    `static java.nio.ByteBuffer` | `encodeBound(CFMetaData metadata, ClusteringBound bound, boolean isStart)`
    `static java.nio.ByteBuffer` | `encodeCellName(CFMetaData metadata, ClusteringPrefix clustering, java.nio.ByteBuffer columnName, java.nio.ByteBuffer collectionElement)`
    `static java.nio.ByteBuffer` | `encodeClustering(CFMetaData metadata, ClusteringPrefix clustering)`
    `static Row` | `extractStaticColumns(CFMetaData metadata, DataInputPlus in, Columns statics)`
    `static Pair<LegacyLayout.LegacyRangeTombstoneList,java.util.Iterator<LegacyLayout.LegacyCell>>` | `fromRowIterator(RowIterator iterator)`
    `static LegacyLayout.LegacyUnfilteredPartition` | `fromUnfilteredRowIterator(ReadCommand command, UnfilteredRowIterator iterator)`
    `static java.util.Comparator<LegacyLayout.LegacyCell>` | `legacyCellComparator(CFMetaData metadata)`
    `static java.util.Comparator<LegacyLayout.LegacyCell>` | `legacyCellComparator(CFMetaData metadata, boolean reversed)`
    `static java.util.Comparator<LegacyLayout.LegacyCellName>` | `legacyCellNameComparator(CFMetaData metadata, boolean reversed)`
    `static AbstractType<?>` | `makeLegacyComparator(CFMetaData metadata)`
    `static UnfilteredRowIterator` | `onWireCellstoUnfilteredRowIterator(CFMetaData metadata, DecoratedKey key, LegacyLayout.LegacyDeletionInfo delInfo, java.util.Iterator<LegacyLayout.LegacyCell> cells, boolean reversed, SerializationHelper helper)`
    `static LegacyLayout.LegacyAtom` | `readLegacyAtom(CFMetaData metadata, DataInputPlus in, boolean readAllAsDynamic)`
    `static LegacyLayout.LegacyCell` | `readLegacyCell(CFMetaData metadata, java.io.DataInput in, SerializationHelper.Flag flag)`
    `static LegacyLayout.LegacyCell` | `readLegacyCellBody(CFMetaData metadata, java.io.DataInput in, java.nio.ByteBuffer cellname, int mask, SerializationHelper.Flag flag, boolean readAllAsDynamic)`
    `static LegacyLayout.LegacyRangeTombstone` | `readLegacyRangeTombstoneBody(CFMetaData metadata, DataInputPlus in, java.nio.ByteBuffer boundname)`
    `static void` | `serializeAsLegacyPartition(ReadCommand command, UnfilteredRowIterator partition, DataOutputPlus out, int version)`
    `static long` | `serializedSizeAsLegacyPartition(ReadCommand command, UnfilteredRowIterator partition, int version)`
    `static RowIterator` | `toRowIterator(CFMetaData metadata, DecoratedKey key, java.util.Iterator<LegacyLayout.LegacyCell> cells, int nowInSec)`
    `static UnfilteredRowIterator` | `toUnfilteredRowIterator(CFMetaData metadata, DecoratedKey key, LegacyLayout.LegacyDeletionInfo delInfo, java.util.Iterator<LegacyLayout.LegacyCell> cells)`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MAX_CELL_NAME_LENGTH

          public static final int MAX_CELL_NAME_LENGTH

      See Also:
        Constant Field Values

    - #### STATIC_PREFIX

          public static final int STATIC_PREFIX

      See Also:
        Constant Field Values

    - #### DELETION_MASK

          public static final int DELETION_MASK

      See Also:
        Constant Field Values

    - #### EXPIRATION_MASK

          public static final int EXPIRATION_MASK

      See Also:
        Constant Field Values

    - #### COUNTER_MASK

          public static final int COUNTER_MASK

      See Also:
        Constant Field Values

    - #### COUNTER_UPDATE_MASK

          public static final int COUNTER_UPDATE_MASK

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### makeLegacyComparator

          public static AbstractType<?> makeLegacyComparator(CFMetaData metadata)

    - #### decodeCellName

          public static LegacyLayout.LegacyCellName decodeCellName(CFMetaData metadata,
                                                                   java.nio.ByteBuffer superColumnName,
                                                                   java.nio.ByteBuffer cellname)
                                                            throws UnknownColumnException

      Throws:
        `UnknownColumnException`

    - #### decodeCellName

          public static LegacyLayout.LegacyCellName decodeCellName(CFMetaData metadata,
                                                                   java.nio.ByteBuffer cellname)
                                                            throws UnknownColumnException

      Throws:
        `UnknownColumnException`

    - #### decodeCellName

          public static LegacyLayout.LegacyCellName decodeCellName(CFMetaData metadata,
                                                                   java.nio.ByteBuffer cellname,
                                                                   boolean readAllAsDynamic)
                                                            throws UnknownColumnException

      Throws:
        `UnknownColumnException`

    - #### decodeBound

          public static LegacyLayout.LegacyBound decodeBound(CFMetaData metadata,
                                                             java.nio.ByteBuffer bound,
                                                             boolean isStart)

    - #### encodeBound

          public static java.nio.ByteBuffer encodeBound(CFMetaData metadata,
                                                        ClusteringBound bound,
                                                        boolean isStart)

    - #### encodeCellName

          public static java.nio.ByteBuffer encodeCellName(CFMetaData metadata,
                                                           ClusteringPrefix clustering,
                                                           java.nio.ByteBuffer columnName,
                                                           java.nio.ByteBuffer collectionElement)

    - #### decodeClustering

          public static Clustering decodeClustering(CFMetaData metadata,
                                                    java.nio.ByteBuffer value)

    - #### encodeClustering

          public static java.nio.ByteBuffer encodeClustering(CFMetaData metadata,
                                                             ClusteringPrefix clustering)

    - #### fromUnfilteredRowIterator

          public static LegacyLayout.LegacyUnfilteredPartition fromUnfilteredRowIterator(ReadCommand command,
                                                                                         UnfilteredRowIterator iterator)

    - #### serializeAsLegacyPartition

          public static void serializeAsLegacyPartition(ReadCommand command,
                                                        UnfilteredRowIterator partition,
                                                        DataOutputPlus out,
                                                        int version)
                                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeLegacyPartition

          public static UnfilteredRowIterator deserializeLegacyPartition(DataInputPlus in,
                                                                         int version,
                                                                         SerializationHelper.Flag flag,
                                                                         java.nio.ByteBuffer key)
                                                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### serializedSizeAsLegacyPartition

          public static long serializedSizeAsLegacyPartition(ReadCommand command,
                                                             UnfilteredRowIterator partition,
                                                             int version)

    - #### toUnfilteredRowIterator

          public static UnfilteredRowIterator toUnfilteredRowIterator(CFMetaData metadata,
                                                                      DecoratedKey key,
                                                                      LegacyLayout.LegacyDeletionInfo delInfo,
                                                                      java.util.Iterator<LegacyLayout.LegacyCell> cells)

    - #### onWireCellstoUnfilteredRowIterator

          public static UnfilteredRowIterator onWireCellstoUnfilteredRowIterator(CFMetaData metadata,
                                                                                 DecoratedKey key,
                                                                                 LegacyLayout.LegacyDeletionInfo delInfo,
                                                                                 java.util.Iterator<LegacyLayout.LegacyCell> cells,
                                                                                 boolean reversed,
                                                                                 SerializationHelper helper)

    - #### extractStaticColumns

          public static Row extractStaticColumns(CFMetaData metadata,
                                                 DataInputPlus in,
                                                 Columns statics)
                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### fromRowIterator

          public static Pair<LegacyLayout.LegacyRangeTombstoneList,java.util.Iterator<LegacyLayout.LegacyCell>> fromRowIterator(RowIterator iterator)

    - #### toRowIterator

          public static RowIterator toRowIterator(CFMetaData metadata,
                                                  DecoratedKey key,
                                                  java.util.Iterator<LegacyLayout.LegacyCell> cells,
                                                  int nowInSec)

    - #### legacyCellComparator

          public static java.util.Comparator<LegacyLayout.LegacyCell> legacyCellComparator(CFMetaData metadata)

    - #### legacyCellComparator

          public static java.util.Comparator<LegacyLayout.LegacyCell> legacyCellComparator(CFMetaData metadata,
                                                                                           boolean reversed)

    - #### legacyCellNameComparator

          public static java.util.Comparator<LegacyLayout.LegacyCellName> legacyCellNameComparator(CFMetaData metadata,
                                                                                                   boolean reversed)

    - #### readLegacyAtom

          public static LegacyLayout.LegacyAtom readLegacyAtom(CFMetaData metadata,
                                                               DataInputPlus in,
                                                               boolean readAllAsDynamic)
                                                        throws java.io.IOException,
                                                               UnknownColumnException

      Throws:
        `java.io.IOException`
        `UnknownColumnException`

    - #### readLegacyCell

          public static LegacyLayout.LegacyCell readLegacyCell(CFMetaData metadata,
                                                               java.io.DataInput in,
                                                               SerializationHelper.Flag flag)
                                                        throws java.io.IOException,
                                                               UnknownColumnException

      Throws:
        `java.io.IOException`
        `UnknownColumnException`

    - #### readLegacyCellBody

          public static LegacyLayout.LegacyCell readLegacyCellBody(CFMetaData metadata,
                                                                   java.io.DataInput in,
                                                                   java.nio.ByteBuffer cellname,
                                                                   int mask,
                                                                   SerializationHelper.Flag flag,
                                                                   boolean readAllAsDynamic)
                                                            throws java.io.IOException,
                                                                   UnknownColumnException

      Throws:
        `java.io.IOException`
        `UnknownColumnException`

    - #### readLegacyRangeTombstoneBody

          public static LegacyLayout.LegacyRangeTombstone readLegacyRangeTombstoneBody(CFMetaData metadata,
                                                                                       DataInputPlus in,
                                                                                       java.nio.ByteBuffer boundname)
                                                                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeCells

          public static java.util.Iterator<LegacyLayout.LegacyCell> deserializeCells(CFMetaData metadata,
                                                                                     java.io.DataInput in,
                                                                                     SerializationHelper.Flag flag,
                                                                                     int size)

Copyright © 2018 The Apache Software Foundation