Class EventCountCircuitBreaker.CheckIntervalData

  • Enclosing class:
    EventCountCircuitBreaker

    private static final class EventCountCircuitBreaker.CheckIntervalData
    extends java.lang.Object
    An internally used data class holding information about the checks performed by this class. Basically, the number of received events and the start time of the current check interval are stored.
    • Field Detail

      • eventCount

        private final int eventCount
        The counter for events.
      • checkIntervalStart

        private final long checkIntervalStart
        The start time of the current check interval.
    • Constructor Detail

      • CheckIntervalData

        CheckIntervalData​(int count,
                          long intervalStart)
        Parameters:
        count - the current count value
        intervalStart - the start time of the check interval
    • Method Detail

      • getCheckIntervalStart

        public long getCheckIntervalStart()
        Returns the start time of the current check interval.
        Returns:
        the check interval start time
      • getEventCount

        public int getEventCount()
        Returns the event counter.
        Returns:
        the number of received events