Class RetryCounter


  • public class RetryCounter
    extends java.lang.Object
    A non-thread safe counter that should be used and increased in a single thread env when the increment is called
    • Constructor Detail

      • RetryCounter

        public RetryCounter()
    • Method Detail

      • getCurrentSecond

        public static long getCurrentSecond()
        Return current second starting based on System.nanoTime. It is good for a short period comparison.
        Returns:
      • increment

        public void increment​(boolean isRetry)
      • getRetryCount

        public long getRetryCount()
      • getTotalCount

        public long getTotalCount()
      • toString

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

        public long getTimestamp()