Class ShardManagerDiskAware.BoundaryTrackerDiskAware
java.lang.Object
org.apache.cassandra.db.compaction.ShardManagerDiskAware.BoundaryTrackerDiskAware
- All Implemented Interfaces:
ShardTracker
- Enclosing class:
- ShardManagerDiskAware
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdvance to the given token (e.g.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) shardEnd()intdoubleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.db.compaction.ShardTracker
applyTokenSpaceCoverage, shardAdjustedKeyCount
-
Constructor Details
-
BoundaryTrackerDiskAware
public BoundaryTrackerDiskAware(int countPerDisk)
-
-
Method Details
-
shardStart
- Specified by:
shardStartin interfaceShardTracker
-
shardEnd
- Specified by:
shardEndin interfaceShardTracker
-
shardSpan
- Specified by:
shardSpanin interfaceShardTracker
-
shardSpanSize
public double shardSpanSize()- Specified by:
shardSpanSizein interfaceShardTracker
-
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.- Specified by:
advanceToin interfaceShardTracker
-
count
public int count()- Specified by:
countin interfaceShardTracker
-
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.- Specified by:
fractionInShardin interfaceShardTracker
-
rangeSpanned
- Specified by:
rangeSpannedin interfaceShardTracker
-
shardIndex
public int shardIndex()- Specified by:
shardIndexin interfaceShardTracker
-