Interface ShardTracker
- All Known Implementing Classes:
ShardManagerDiskAware.BoundaryTrackerDiskAware,ShardManagerNoDisks.BoundaryTracker
public interface ShardTracker
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdvance to the given token (e.g.default voidapplyTokenSpaceCoverage(SSTableWriter writer) intcount()doublefractionInShard(Range<Token> targetSpan) Returns the fraction of the given token range's coverage that falls within this shard.doublerangeSpanned(PartitionPosition first, PartitionPosition last) default longshardAdjustedKeyCount(Set<SSTableReader> sstables) shardEnd()intdouble
-
Method Details
-
shardStart
Token shardStart() -
shardEnd
-
shardSpan
-
shardSpanSize
double shardSpanSize() -
advanceTo
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
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
-
shardIndex
int shardIndex() -
shardAdjustedKeyCount
-
applyTokenSpaceCoverage
-