Package org.redisson.pubsub
Class AsyncSemaphore
- java.lang.Object
-
- org.redisson.pubsub.AsyncSemaphore
-
public class AsyncSemaphore extends Object
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description AsyncSemaphore(int permits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquire(Runnable listener)
void
acquire(Runnable listener, int permits)
int
getCounter()
int
queueSize()
void
release()
boolean
remove(Runnable listener)
void
removeListeners()
String
toString()
boolean
tryAcquire(long timeoutMillis)
-
-
-
Method Detail
-
tryAcquire
public boolean tryAcquire(long timeoutMillis)
-
queueSize
public int queueSize()
-
removeListeners
public void removeListeners()
-
acquire
public void acquire(Runnable listener)
-
acquire
public void acquire(Runnable listener, int permits)
-
remove
public boolean remove(Runnable listener)
-
getCounter
public int getCounter()
-
release
public void release()
-
-