Module java.base
Package java.util.concurrent

# Class Semaphore

=
public class Semaphore
extends java.lang.Object
implements java.io.Serializable

## Constructors

- =
  public Semaphore(int arg0)
- =
  public Semaphore(int arg0, boolean arg1)

## Methods

- =
  public void acquire() throws java.lang.InterruptedException
- =
  public void acquire(int arg0) throws java.lang.InterruptedException
- =
  public void acquireUninterruptibly()
- =
  public void acquireUninterruptibly(int arg0)
- =
  public int availablePermits()
- =
  public int drainPermits()
- =
  public final int getQueueLength()
- =
  protected java.util.Collection<java.lang.Thread> getQueuedThreads()
- =
  public final boolean hasQueuedThreads()
- =
  public boolean isFair()
- =
  protected void reducePermits(int arg0)
- =
  public void release()
- =
  public void release(int arg0)
- =
  public java.lang.String toString()
- =
  public boolean tryAcquire()
- =
  public boolean tryAcquire(int arg0)
- =
  public boolean tryAcquire(int arg0, long arg1, java.util.concurrent.TimeUnit arg2) throws java.lang.InterruptedException
- =
  public boolean tryAcquire(long arg0, java.util.concurrent.TimeUnit arg1) throws java.lang.InterruptedException

## Serialized Form

=

### serialVersionUID

=-3222578661600680210

### Serialized Fields

- =
  java.util.concurrent.Semaphore.Sync sync

## Summary

No differences.