java.lang.Object
java.util.concurrent.Semaphore
io.helidon.common.concurrency.limits.NoopSemaphore
All Implemented Interfaces:
Serializable

@Deprecated(forRemoval=true, since="4.2.0") public class NoopSemaphore extends Semaphore
Deprecated, for removal: This API element is subject to removal in a future version.
this is only provided for backward compatibility and will be removed, use FixedLimit.create() to get unlimited limit
A semaphore that does nothing. Use INSTANCE to get an instance of this semaphore.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Semaphore
    Deprecated, for removal: This API element is subject to removal in a future version.
    Singleton instance to be used whenever needed.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    acquire(int permits)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected Collection<Thread>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    reducePermits(int reduction)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    release(int permits)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    tryAcquire(int permits)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    tryAcquire(int permits, long timeout, TimeUnit unit)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    tryAcquire(long timeout, TimeUnit unit)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.util.concurrent.Semaphore

    getQueueLength, hasQueuedThreads

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • INSTANCE

      public static final Semaphore INSTANCE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Singleton instance to be used whenever needed.
  • Method Details

    • acquire

      public void acquire() throws InterruptedException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      acquire in class Semaphore
      Throws:
      InterruptedException
    • acquireUninterruptibly

      public void acquireUninterruptibly()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      acquireUninterruptibly in class Semaphore
    • tryAcquire

      public boolean tryAcquire()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      tryAcquire in class Semaphore
    • tryAcquire

      public boolean tryAcquire(long timeout, TimeUnit unit) throws InterruptedException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      tryAcquire in class Semaphore
      Throws:
      InterruptedException
    • release

      public void release()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      release in class Semaphore
    • acquire

      public void acquire(int permits) throws InterruptedException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      acquire in class Semaphore
      Throws:
      InterruptedException
    • acquireUninterruptibly

      public void acquireUninterruptibly(int permits)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      acquireUninterruptibly in class Semaphore
    • tryAcquire

      public boolean tryAcquire(int permits)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      tryAcquire in class Semaphore
    • tryAcquire

      public boolean tryAcquire(int permits, long timeout, TimeUnit unit) throws InterruptedException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      tryAcquire in class Semaphore
      Throws:
      InterruptedException
    • release

      public void release(int permits)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      release in class Semaphore
    • availablePermits

      public int availablePermits()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      availablePermits in class Semaphore
    • drainPermits

      public int drainPermits()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      drainPermits in class Semaphore
    • reducePermits

      protected void reducePermits(int reduction)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      reducePermits in class Semaphore
    • isFair

      public boolean isFair()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      isFair in class Semaphore
    • getQueuedThreads

      protected Collection<Thread> getQueuedThreads()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getQueuedThreads in class Semaphore
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Semaphore