Package com.linkedin.alpini.base.misc
Class RetryCounter
java.lang.Object
com.linkedin.alpini.base.misc.RetryCounter
A non-thread safe counter that should be used and increased in a single thread env when the increment is called
-
Constructor Details
-
RetryCounter
public RetryCounter()
-
-
Method Details
-
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
-
getTimestamp
public long getTimestamp()
-