public class ActiveObjectCounter<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.ConcurrentMap<T,java.util.concurrent.CountDownLatch> |
locks |
| Constructor and Description |
|---|
ActiveObjectCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T object) |
boolean |
await(java.lang.Long timeout,
java.util.concurrent.TimeUnit timeUnit) |
int |
getCount() |
void |
release(T object) |
void |
reset() |
private final java.util.concurrent.ConcurrentMap<T,java.util.concurrent.CountDownLatch> locks
public void add(T object)
public void release(T object)
public boolean await(java.lang.Long timeout,
java.util.concurrent.TimeUnit timeUnit)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic int getCount()
public void reset()