Class TopPartitionTracker.TopHolder

  • Enclosing class:
    TopPartitionTracker

    public static class TopPartitionTracker.TopHolder
    extends java.lang.Object
    • 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 copy
        ownedRanges - the ranges this node owns - any existing token outside of these ranges will get dropped
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toMap

        public java.util.Map<java.lang.String,​java.lang.Long> toMap​(TableMetadata metadata)