public final class GammaObjectPool extends Object
Constructor and Description |
---|
GammaObjectPool() |
Modifier and Type | Method and Description |
---|---|
void |
put(Tranlocal tranlocal)
Puts an old Tranlocal in this pool.
|
void |
putArrayList(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.
|
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.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.NullPointerException
- is array is null.public Tranlocal[] takeTranlocalArray(int size)
size
- the size of the array to takeIllegalArgumentException
- if size smaller than 0.public CallableNode takeCallableNode()
public void putCallableNode(CallableNode node)
node
- the CallableNode to pool.NullPointerException
- if node is null.public ArrayList takeArrayList()
public void putArrayList(ArrayList list)
list
- the ArrayList to place in the pool.NullPointerException
- if list is null.public Listeners takeListeners()
public void putListeners(Listeners listeners)
listeners
- the Listeners object to pool.NullPointerException
- is listeners is null.public Listeners[] takeListenersArray(int minimalSize)
minimalSize
- the minimalSize of the Listeners array.IllegalArgumentException
- if minimalSize is smaller than 0.public void putListenersArray(Listeners[] listenersArray)
listenersArray
- the array to pool.NullPointerException
- if listenersArray is null.Copyright © 2020. All rights reserved.