public final class GammaObjectPool
extends java.lang.Object
Constructor and Description |
---|
GammaObjectPool() |
Modifier and Type | Method and Description |
---|---|
void |
put(Tranlocal tranlocal)
Puts an old Tranlocal in this pool.
|
void |
putArrayList(java.util.ArrayList list)
Puts an ArrayList in this pool.
|
void |
putCallableNode(CallableNode node)
Puts a CallableNode in the pool.
|
void |
putListeners(Listeners listeners)
Puts a Listeners object in the pool.
|
void |
putListenersArray(Listeners[] listenersArray)
Puts a Listeners array in the pool.
|
void |
putTranlocalArray(Tranlocal[] array)
Puts a GammaTranlocal array in the pool.
|
Tranlocal |
take(BaseGammaTxnRef owner)
Takes a Tranlocal from the pool for the specified GammaTxnRef.
|
java.util.ArrayList |
takeArrayList()
Takes an ArrayList from the pool, The returned ArrayList is cleared.
|
CallableNode |
takeCallableNode()
Takes a CallableNode from the pool, or null if none is available.
|
Listeners |
takeListeners()
Takes a Listeners object from the pool.
|
Listeners[] |
takeListenersArray(int minimalSize)
Takes a Listeners array from the pool.
|
Tranlocal[] |
takeTranlocalArray(int size)
Takes a tranlocal array from the pool with the given size.
|
public Tranlocal take(BaseGammaTxnRef owner)
owner
- the GammaTxnRef to get the Tranlocal for.java.lang.NullPointerException
- if owner is null.public void put(Tranlocal tranlocal)
tranlocal
- the Tranlocal to pool.public void putTranlocalArray(Tranlocal[] array)
array
- the GammaTranlocal array to put in the pool.java.lang.NullPointerException
- is array is null.public Tranlocal[] takeTranlocalArray(int size)
size
- the size of the array to takejava.lang.IllegalArgumentException
- if size smaller than 0.public CallableNode takeCallableNode()
public void putCallableNode(CallableNode node)
node
- the CallableNode to pool.java.lang.NullPointerException
- if node is null.public java.util.ArrayList takeArrayList()
public void putArrayList(java.util.ArrayList list)
list
- the ArrayList to place in the pool.java.lang.NullPointerException
- if list is null.public Listeners takeListeners()
public void putListeners(Listeners listeners)
listeners
- the Listeners object to pool.java.lang.NullPointerException
- is listeners is null.public Listeners[] takeListenersArray(int minimalSize)
minimalSize
- the minimalSize of the Listeners array.java.lang.IllegalArgumentException
- if minimalSize is smaller than 0.public void putListenersArray(Listeners[] listenersArray)
listenersArray
- the array to pool.java.lang.NullPointerException
- if listenersArray is null.