org.apache.cassandra.utils

## Class StreamingHistogram.StreamingHistogramBuilder

- java.lang.Object
- - org.apache.cassandra.utils.StreamingHistogram.StreamingHistogramBuilder

- Enclosing class:
    StreamingHistogram

      public static class StreamingHistogram.StreamingHistogramBuilder
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamingHistogramBuilder(int maxBinSize, int maxSpoolSize, int roundSeconds)` Creates a new histogram with max bin size of maxBinSize

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StreamingHistogram` | `build()`
    `void` | `flushHistogram()` Drain the temporary spool into the final bins
    `void` | `merge(StreamingHistogram other)` Merges given histogram with this histogram.
    `void` | `update(java.lang.Number p)` Adds new point p to this histogram.
    `void` | `update(java.lang.Number p, long m)` Adds new point p with value m to this histogram.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StreamingHistogramBuilder

          public StreamingHistogramBuilder(int maxBinSize,
                                           int maxSpoolSize,
                                           int roundSeconds)

      Creates a new histogram with max bin size of maxBinSize
      Parameters:
        `maxBinSize` - maximum number of bins this histogram can have

  - ### Method Detail

    - #### build

          public StreamingHistogram build()

    - #### update

          public void update(java.lang.Number p)

      Adds new point p to this histogram.
      Parameters:
        `p` -

    - #### update

          public void update(java.lang.Number p,
                             long m)

      Adds new point p with value m to this histogram.
      Parameters:
        `p` -
        `m` -

    - #### flushHistogram

          public void flushHistogram()

      Drain the temporary spool into the final bins

    - #### merge

          public void merge(StreamingHistogram other)

      Merges given histogram with this histogram.
      Parameters:
        `other` - histogram to merge

Copyright © 2018 The Apache Software Foundation