org.apache.cassandra.io.sstable.metadata

## Class StatsMetadata

- java.lang.Object
- - org.apache.cassandra.io.sstable.metadata.MetadataComponent
  - - org.apache.cassandra.io.sstable.metadata.StatsMetadata

- All Implemented Interfaces:
    java.lang.Comparable<MetadataComponent>

      public class StatsMetadata
      extends MetadataComponent

  SSTable metadata that always stay on heap.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StatsMetadata.StatsMetadataSerializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ReplayPosition` | `commitLogLowerBound`
    `ReplayPosition` | `commitLogUpperBound`
    `double` | `compressionRatio`
    `EstimatedHistogram` | `estimatedColumnCount`
    `EstimatedHistogram` | `estimatedRowSize`
    `StreamingHistogram` | `estimatedTombstoneDropTime`
    `boolean` | `hasLegacyCounterShards`
    `java.util.List<java.nio.ByteBuffer>` | `maxColumnNames`
    `int` | `maxLocalDeletionTime`
    `long` | `maxTimestamp`
    `java.util.List<java.nio.ByteBuffer>` | `minColumnNames`
    `long` | `minTimestamp`
    `long` | `repairedAt`
    `static IMetadataComponentSerializer` | `serializer`
    `int` | `sstableLevel`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatsMetadata(EstimatedHistogram estimatedRowSize, EstimatedHistogram estimatedColumnCount, ReplayPosition commitLogLowerBound, ReplayPosition commitLogUpperBound, long minTimestamp, long maxTimestamp, int maxLocalDeletionTime, double compressionRatio, StreamingHistogram estimatedTombstoneDropTime, int sstableLevel, java.util.List<java.nio.ByteBuffer> minColumnNames, java.util.List<java.nio.ByteBuffer> maxColumnNames, boolean hasLegacyCounterShards, long repairedAt)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `double` | `getDroppableTombstonesBefore(int gcBefore)`
    `double` | `getEstimatedDroppableTombstoneRatio(int gcBefore)`
    `MetadataType` | `getType()`
    `int` | `hashCode()`
    `StatsMetadata` | `mutateLevel(int newLevel)`
    `StatsMetadata` | `mutateRepairedAt(long newRepairedAt)`

    - ### Methods inherited from class org.apache.cassandra.io.sstable.metadata.MetadataComponent

      `compareTo`

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

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

- - ### Field Detail

    - #### serializer

          public static final IMetadataComponentSerializer serializer

    - #### estimatedRowSize

          public final EstimatedHistogram estimatedRowSize

    - #### estimatedColumnCount

          public final EstimatedHistogram estimatedColumnCount

    - #### commitLogLowerBound

          public final ReplayPosition commitLogLowerBound

    - #### commitLogUpperBound

          public final ReplayPosition commitLogUpperBound

    - #### minTimestamp

          public final long minTimestamp

    - #### maxTimestamp

          public final long maxTimestamp

    - #### maxLocalDeletionTime

          public final int maxLocalDeletionTime

    - #### compressionRatio

          public final double compressionRatio

    - #### estimatedTombstoneDropTime

          public final StreamingHistogram estimatedTombstoneDropTime

    - #### sstableLevel

          public final int sstableLevel

    - #### maxColumnNames

          public final java.util.List<java.nio.ByteBuffer> maxColumnNames

    - #### minColumnNames

          public final java.util.List<java.nio.ByteBuffer> minColumnNames

    - #### hasLegacyCounterShards

          public final boolean hasLegacyCounterShards

    - #### repairedAt

          public final long repairedAt

  - ### Constructor Detail

    - #### StatsMetadata

          public StatsMetadata(EstimatedHistogram estimatedRowSize,
                               EstimatedHistogram estimatedColumnCount,
                               ReplayPosition commitLogLowerBound,
                               ReplayPosition commitLogUpperBound,
                               long minTimestamp,
                               long maxTimestamp,
                               int maxLocalDeletionTime,
                               double compressionRatio,
                               StreamingHistogram estimatedTombstoneDropTime,
                               int sstableLevel,
                               java.util.List<java.nio.ByteBuffer> minColumnNames,
                               java.util.List<java.nio.ByteBuffer> maxColumnNames,
                               boolean hasLegacyCounterShards,
                               long repairedAt)

  - ### Method Detail

    - #### getType

          public MetadataType getType()

      Specified by:
        `getType` in class `MetadataComponent`
      Returns:
        Metadata component type

    - #### getEstimatedDroppableTombstoneRatio

          public double getEstimatedDroppableTombstoneRatio(int gcBefore)

      Parameters:
        `gcBefore` - gc time in seconds
      Returns:
        estimated droppable tombstone ratio at given gcBefore time.

    - #### getDroppableTombstonesBefore

          public double getDroppableTombstonesBefore(int gcBefore)

      Parameters:
        `gcBefore` - gc time in seconds
      Returns:
        amount of droppable tombstones

    - #### mutateLevel

          public StatsMetadata mutateLevel(int newLevel)

    - #### mutateRepairedAt

          public StatsMetadata mutateRepairedAt(long newRepairedAt)

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

Copyright © 2018 The Apache Software Foundation