EncodingStats (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.rows

## Class EncodingStats

- java.lang.Object
- - org.apache.cassandra.db.rows.EncodingStats

-     public class EncodingStats
      extends java.lang.Object

  Stats used for the encoding of the rows and tombstones of a given source.

  Those stats are used to optimize the on-wire and on-disk storage of rows. More precisely, the `minTimestamp`, `minLocalDeletionTime` and `minTTL` stats are used to delta-encode those information for the sake of vint encoding.

  Note that due to their use, those stats can suffer to be somewhat inaccurate (the more incurrate they are, the less effective the storage will be, but provided the stats are not completly wacky, this shouldn't have too huge an impact on performance) and in fact they will not always be accurate for reasons explained in `SerializationHeader.make(org.apache.cassandra.config.CFMetaData, java.util.Collection<org.apache.cassandra.io.sstable.format.SSTableReader>)`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `EncodingStats.Collector`
    `static class` | `EncodingStats.Serializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `minLocalDeletionTime`
    `long` | `minTimestamp`
    `int` | `minTTL`
    `static EncodingStats` | `NO_STATS`
    `static EncodingStats.Serializer` | `serializer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncodingStats(long minTimestamp, int minLocalDeletionTime, int minTTL)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `int` | `hashCode()`
    `EncodingStats` | `mergeWith(EncodingStats that)` Merge this stats with another one.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### NO_STATS

          public static final EncodingStats NO_STATS

    - #### serializer

          public static final EncodingStats.Serializer serializer

    - #### minTimestamp

          public final long minTimestamp

    - #### minLocalDeletionTime

          public final int minLocalDeletionTime

    - #### minTTL

          public final int minTTL

  - ### Constructor Detail

    - #### EncodingStats

          public EncodingStats(long minTimestamp,
                               int minLocalDeletionTime,
                               int minTTL)

  - ### Method Detail

    - #### mergeWith

          public EncodingStats mergeWith(EncodingStats that)

      Merge this stats with another one.

      The comments of `SerializationHeader.make(org.apache.cassandra.config.CFMetaData, java.util.Collection<org.apache.cassandra.io.sstable.format.SSTableReader>)` applies here too, i.e. the result of merging will be not totally accurate but we can live with that.

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2018 The Apache Software Foundation