Class ActiveObjectCounter<T>
- java.lang.Object
-
- org.springframework.amqp.rabbit.support.ActiveObjectCounter<T>
-
- Type Parameters:
T
- the object type.
public class ActiveObjectCounter<T> extends Object
A mechanism to keep track of active objects.- Author:
- Dave Syer, Artem Bilan
-
-
Constructor Summary
Constructors Constructor Description ActiveObjectCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(T object)
boolean
await(long timeout, TimeUnit timeUnit)
void
deactivate()
int
getCount()
boolean
isActive()
void
release(T object)
void
reset()
-
-
-
Method Detail
-
add
public void add(T object)
-
release
public void release(T object)
-
await
public boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException
- Throws:
InterruptedException
-
getCount
public int getCount()
-
reset
public void reset()
-
deactivate
public void deactivate()
-
isActive
public boolean isActive()
-
-