Class AtomicBackoff.State

  • Enclosing class:
    AtomicBackoff

    @ThreadSafe
    public final class AtomicBackoff.State
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long savedValue  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private State​(long value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void backoff()
      Causes future invocations of AtomicBackoff.getState() to have a value at least double this state's value.
      long get()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • savedValue

        private final long savedValue
    • Constructor Detail

      • State

        private State​(long value)
    • Method Detail

      • get

        public long get()
      • backoff

        public void backoff()
        Causes future invocations of AtomicBackoff.getState() to have a value at least double this state's value. Subsequent calls to this method will not increase the value further.