|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmali.pooling.ObjectPool<T>
T
- public abstract class ObjectPool<T>
Simple collection used to store free objects which we need to work with frequently. This is to solve some of the issues with garbage collection of frequently used objects
Constructor Summary | |
---|---|
ObjectPool(int initialSize)
|
Method Summary | |
---|---|
T |
alloc()
|
void |
free(T o)
|
int |
getSize()
|
protected abstract T |
newInstance()
Creates a new instance of a pooled object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectPool(int initialSize)
Method Detail |
---|
public int getSize()
protected abstract T newInstance()
public T alloc()
public void free(T o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |