Class EncodingStats
- All Implemented Interfaces:
IMeasurableMemory
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.schema.TableMetadata, java.util.Collection<org.apache.cassandra.io.sstable.format.SSTableReader>).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longfinal longfinal longfinal intstatic final EncodingStatsstatic final EncodingStats.Serializerstatic final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static <V,F extends Function<V, EncodingStats>>
EncodingStatsMerge one or more EncodingStats, that are lazily materialized from some list of arbitrary type by the provided functionmergeWith(EncodingStats that) Merge this stats with another one.toString()long
-
Field Details
-
TIMESTAMP_EPOCH
public static final long TIMESTAMP_EPOCH -
NO_STATS
-
HEAP_SIZE
public static final long HEAP_SIZE -
serializer
-
minTimestamp
public final long minTimestamp -
minLocalDeletionTime
public final long minLocalDeletionTime -
minTTL
public final int minTTL
-
-
Constructor Details
-
EncodingStats
public EncodingStats(long minTimestamp, long minLocalDeletionTime, int minTTL)
-
-
Method Details
-
mergeWith
Merge this stats with another one.The comments of
SerializationHeader.make(org.apache.cassandra.schema.TableMetadata, 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. -
merge
public static <V,F extends Function<V, EncodingStats mergeEncodingStats>> (List<V> values, F function) Merge one or more EncodingStats, that are lazily materialized from some list of arbitrary type by the provided function -
equals
-
hashCode
public int hashCode() -
toString
-