Interface ShardTracker

All Known Implementing Classes:
ShardManagerDiskAware.BoundaryTrackerDiskAware, ShardManagerNoDisks.BoundaryTracker

public interface ShardTracker
  • Method Details

    • shardStart

      Token shardStart()
    • shardEnd

      @Nullable Token shardEnd()
    • shardSpan

      Range<Token> shardSpan()
    • shardSpanSize

      double shardSpanSize()
    • advanceTo

      boolean advanceTo(Token nextToken)
      Advance to the given token (e.g. before writing a key). Returns true if this resulted in advancing to a new shard, and false otherwise.
    • count

      int count()
    • fractionInShard

      double fractionInShard(Range<Token> targetSpan)
      Returns the fraction of the given token range's coverage that falls within this shard. E.g. if the span covers two shards exactly and the current shard is one of them, it will return 0.5.
    • rangeSpanned

      double rangeSpanned(PartitionPosition first, PartitionPosition last)
    • shardIndex

      int shardIndex()
    • shardAdjustedKeyCount

      default long shardAdjustedKeyCount(Set<SSTableReader> sstables)
    • applyTokenSpaceCoverage

      default void applyTokenSpaceCoverage(SSTableWriter writer)