Class TimedCircuitStats

  • All Implemented Interfaces:
    CircuitStats

    class TimedCircuitStats
    extends java.lang.Object
    implements CircuitStats
    A CircuitStats implementation that counts execution results within a time period, and buckets results to minimize overhead.
    • Method Detail

      • copyStats

        void copyStats​(CircuitStats oldStats)
        Copies the most recent stats from the oldStats into this in order from oldest to newest and orders buckets from oldest to newest, with uninitialized buckets counting as oldest.
      • getCurrentBucket

        TimedCircuitStats.Bucket getCurrentBucket()
        Returns the current bucket based on the current time, moving the internal storage to the current bucket if necessary, resetting bucket stats along the way.
      • nextIndex

        private int nextIndex()
        Returns the next index.
      • indexAfter

        private int indexAfter​(int index)
        Returns the index after the index.
      • indexBefore

        private int indexBefore​(int index)
        Returns the index before the index.
      • toString

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