Class ReEntryGuard

  • All Implemented Interfaces:
    java.io.Serializable

    public class ReEntryGuard
    extends java.util.concurrent.atomic.AtomicInteger
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void guard​(@NotNull java.lang.Runnable runnable)  
      void ifUnguarded​(boolean ifGuardedRunOnExit, @NotNull java.lang.Runnable runnable)  
      void ifUnguarded​(@NotNull java.lang.Runnable runnable)  
      void ifUnguarded​(@NotNull java.lang.Runnable runnable, @Nullable java.lang.Runnable runOnGuardExit)  
      boolean unguarded()  
      • Methods inherited from class java.util.concurrent.atomic.AtomicInteger

        accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
      • Methods inherited from class java.lang.Number

        byteValue, shortValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReEntryGuard

        public ReEntryGuard​(int initialValue)
      • ReEntryGuard

        public ReEntryGuard()
    • Method Detail

      • ifUnguarded

        public void ifUnguarded​(@NotNull
                                @NotNull java.lang.Runnable runnable)
      • ifUnguarded

        public void ifUnguarded​(boolean ifGuardedRunOnExit,
                                @NotNull
                                @NotNull java.lang.Runnable runnable)
      • ifUnguarded

        public void ifUnguarded​(@NotNull
                                @NotNull java.lang.Runnable runnable,
                                @Nullable
                                @Nullable java.lang.Runnable runOnGuardExit)
      • guard

        public void guard​(@NotNull
                          @NotNull java.lang.Runnable runnable)
      • unguarded

        public boolean unguarded()