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
    --- | ---
    `IntervalSet<CommitLogPosition>` | `commitLogIntervals`
    `static ISerializer<IntervalSet<CommitLogPosition>>` | `commitLogPositionSetSerializer`
    `double` | `compressionRatio`
    `EstimatedHistogram` | `estimatedColumnCount`
    `EstimatedHistogram` | `estimatedPartitionSize`
    `StreamingHistogram` | `estimatedTombstoneDropTime`
    `boolean` | `hasLegacyCounterShards`
    `java.util.List<java.nio.ByteBuffer>` | `maxClusteringValues`
    `int` | `maxLocalDeletionTime`
    `long` | `maxTimestamp`
    `int` | `maxTTL`
    `java.util.List<java.nio.ByteBuffer>` | `minClusteringValues`
    `int` | `minLocalDeletionTime`
    `long` | `minTimestamp`
    `int` | `minTTL`
    `long` | `repairedAt`
    `static IMetadataComponentSerializer` | `serializer`
    `int` | `sstableLevel`
    `long` | `totalColumnsSet`
    `long` | `totalRows`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatsMetadata(EstimatedHistogram estimatedPartitionSize, EstimatedHistogram estimatedColumnCount, IntervalSet<CommitLogPosition> commitLogIntervals, long minTimestamp, long maxTimestamp, int minLocalDeletionTime, int maxLocalDeletionTime, int minTTL, int maxTTL, double compressionRatio, StreamingHistogram estimatedTombstoneDropTime, int sstableLevel, java.util.List<java.nio.ByteBuffer> minClusteringValues, java.util.List<java.nio.ByteBuffer> maxClusteringValues, boolean hasLegacyCounterShards, long repairedAt, long totalColumnsSet, long totalRows)`

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

    - #### commitLogPositionSetSerializer

          public static final ISerializer<IntervalSet<CommitLogPosition>> commitLogPositionSetSerializer

    - #### estimatedPartitionSize

          public final EstimatedHistogram estimatedPartitionSize

    - #### estimatedColumnCount

          public final EstimatedHistogram estimatedColumnCount

    - #### commitLogIntervals

          public final IntervalSet<CommitLogPosition> commitLogIntervals

    - #### minTimestamp

          public final long minTimestamp

    - #### maxTimestamp

          public final long maxTimestamp

    - #### minLocalDeletionTime

          public final int minLocalDeletionTime

    - #### maxLocalDeletionTime

          public final int maxLocalDeletionTime

    - #### minTTL

          public final int minTTL

    - #### maxTTL

          public final int maxTTL

    - #### compressionRatio

          public final double compressionRatio

    - #### estimatedTombstoneDropTime

          public final StreamingHistogram estimatedTombstoneDropTime

    - #### sstableLevel

          public final int sstableLevel

    - #### minClusteringValues

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

    - #### maxClusteringValues

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

    - #### hasLegacyCounterShards

          public final boolean hasLegacyCounterShards

    - #### repairedAt

          public final long repairedAt

    - #### totalColumnsSet

          public final long totalColumnsSet

    - #### totalRows

          public final long totalRows

  - ### Constructor Detail

    - #### StatsMetadata

          public StatsMetadata(EstimatedHistogram estimatedPartitionSize,
                               EstimatedHistogram estimatedColumnCount,
                               IntervalSet<CommitLogPosition> commitLogIntervals,
                               long minTimestamp,
                               long maxTimestamp,
                               int minLocalDeletionTime,
                               int maxLocalDeletionTime,
                               int minTTL,
                               int maxTTL,
                               double compressionRatio,
                               StreamingHistogram estimatedTombstoneDropTime,
                               int sstableLevel,
                               java.util.List<java.nio.ByteBuffer> minClusteringValues,
                               java.util.List<java.nio.ByteBuffer> maxClusteringValues,
                               boolean hasLegacyCounterShards,
                               long repairedAt,
                               long totalColumnsSet,
                               long totalRows)

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