org.openorb.notify
Class ThreadInstanceRecycler

java.lang.Object
  extended by org.openorb.notify.ThreadInstanceRecycler
All Implemented Interfaces:
InstanceRecycler

public class ThreadInstanceRecycler
extends java.lang.Object
implements InstanceRecycler

Author:
Olivier Modica

Constructor Summary
ThreadInstanceRecycler()
          Default constructor
 
Method Summary
 boolean isInstanceAvailable()
          Return true if some recycled instances are available
 java.lang.Object obtainInstance()
          Obtain a recycled instance
 void recycleInstance(java.lang.Object thread)
          Recycle an instance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadInstanceRecycler

public ThreadInstanceRecycler()
Default constructor

Method Detail

obtainInstance

public java.lang.Object obtainInstance()
Obtain a recycled instance

Specified by:
obtainInstance in interface InstanceRecycler

recycleInstance

public void recycleInstance(java.lang.Object thread)
Recycle an instance

Specified by:
recycleInstance in interface InstanceRecycler

isInstanceAvailable

public boolean isInstanceAvailable()
Return true if some recycled instances are available

Specified by:
isInstanceAvailable in interface InstanceRecycler