Package org.apache.cassandra.metrics
Class TopPartitionTracker.TopHolder
- java.lang.Object
-
- org.apache.cassandra.metrics.TopPartitionTracker.TopHolder
-
- Enclosing class:
- TopPartitionTracker
public static class TopPartitionTracker.TopHolder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description long
lastUpdate
java.util.NavigableSet<TopPartitionTracker.TopPartition>
top
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TopPartitionTracker.TopHolder
merge(TopPartitionTracker.TopHolder holder, java.util.Collection<Range<Token>> ownedRanges)
we merge any pre-existing top partitions on to the ones we just collected if they are outside of the range collected.java.util.Map<java.lang.String,java.lang.Long>
toMap(TableMetadata metadata)
java.lang.String
toString()
void
track(DecoratedKey key, long value)
-
-
-
Field Detail
-
top
public final java.util.NavigableSet<TopPartitionTracker.TopPartition> top
-
lastUpdate
public final long lastUpdate
-
-
Method Detail
-
track
public void track(DecoratedKey key, long value)
-
merge
public TopPartitionTracker.TopHolder merge(TopPartitionTracker.TopHolder holder, java.util.Collection<Range<Token>> ownedRanges)
we merge any pre-existing top partitions on to the ones we just collected if they are outside of the range collected. This means that if a large partition is deleted it will disappear from the top partitions- Parameters:
holder
- the newly collected holder - this will get copied and any existing token outside of the collected ranges will get added to the copyownedRanges
- the ranges this node owns - any existing token outside of these ranges will get dropped
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toMap
public java.util.Map<java.lang.String,java.lang.Long> toMap(TableMetadata metadata)
-
-