Class NoopSemaphore
java.lang.Object
java.util.concurrent.Semaphore
io.helidon.common.concurrency.limits.NoopSemaphore
- All Implemented Interfaces:
Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
A semaphore that does nothing.
Use
INSTANCE
to get an instance of this semaphore.- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acquire()
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
acquireUninterruptibly
(int permits) 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
isFair()
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
release()
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.toString()
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
-
Field Details
-
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
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
acquire
in classSemaphore
- Throws:
InterruptedException
-
acquireUninterruptibly
public void acquireUninterruptibly()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
acquireUninterruptibly
in classSemaphore
-
tryAcquire
public boolean tryAcquire()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
tryAcquire
in classSemaphore
-
tryAcquire
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
tryAcquire
in classSemaphore
- Throws:
InterruptedException
-
release
public void release()Deprecated, for removal: This API element is subject to removal in a future version. -
acquire
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
acquire
in classSemaphore
- 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 classSemaphore
-
tryAcquire
public boolean tryAcquire(int permits) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
tryAcquire
in classSemaphore
-
tryAcquire
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
tryAcquire
in classSemaphore
- Throws:
InterruptedException
-
release
public void release(int permits) Deprecated, for removal: This API element is subject to removal in a future version. -
availablePermits
public int availablePermits()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
availablePermits
in classSemaphore
-
drainPermits
public int drainPermits()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
drainPermits
in classSemaphore
-
reducePermits
protected void reducePermits(int reduction) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
reducePermits
in classSemaphore
-
isFair
public boolean isFair()Deprecated, for removal: This API element is subject to removal in a future version. -
getQueuedThreads
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getQueuedThreads
in classSemaphore
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.
-
FixedLimit.create()
to get unlimited limit