Class ActiveObjectCounter<T>
- java.lang.Object
-
- org.springframework.amqp.rabbit.support.ActiveObjectCounter<T>
-
- Type Parameters:
T- the object type.
public class ActiveObjectCounter<T> extends java.lang.ObjectA 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 voidadd(T object)booleanawait(long timeout, java.util.concurrent.TimeUnit timeUnit)voiddeactivate()intgetCount()booleanisActive()voidrelease(T object)voidreset()
-
-
-
Method Detail
-
add
public void add(T object)
-
release
public void release(T object)
-
await
public boolean await(long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
getCount
public int getCount()
-
reset
public void reset()
-
deactivate
public void deactivate()
-
isActive
public boolean isActive()
-
-