|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.ObjectPool
This class defines an object pool which stores predefined certain types object instances. When a new object is needed, it can be obtained from this object pool instead of creating a new object on demand. The type of an object in the pool is identified by an object ID. By default, there is no limit on the amount of object with certain type that can be stored in the pool.
Constructor Summary | |
ObjectPool()
Constructor. |
Method Summary | |
void |
addObjInstance(java.lang.Object objInstance,
short objid)
Add a Object instance with specified object id to the pool. |
void |
addObjVector(java.util.Vector v,
short objid)
Add a vector of object instances with specified Object id to the pool. |
int |
getMaxNumOfObjInstances(short objid)
Get the maximum number of a certain type object instances that the pool can store. |
java.lang.Object |
getObjInstance(short objid)
Return a Object instances with specified object id from the pool. |
java.util.Vector |
getObjVector(short objid)
Get the vector of object instances with specified object id in the pool. |
void |
setMaxNumOfObjInstances(short objid,
int num)
Set the maximum number of a certain type object instances that the pool can store. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ObjectPool()
Method Detail |
public void addObjVector(java.util.Vector v, short objid)
public java.util.Vector getObjVector(short objid)
public void addObjInstance(java.lang.Object objInstance, short objid)
public java.lang.Object getObjInstance(short objid)
public void setMaxNumOfObjInstances(short objid, int num)
public int getMaxNumOfObjInstances(short objid)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |