|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.ObjectPool | +--hypercast.FSMPool
This class defines a FSM instance pool which is built when the MessageStore is instantialized. The MessageStore creates instances for each type FSM with the amount specified in the configuration file. These pre-allocated FSM instances are used when a new FSM message is received by the MessageStore and a new FSM is needed. Using pre-allocated FSMs instead of creating a new FSM instance on fly for a new FSM message aims at reducing the processing time of each new FSM message. By default, there is no limit on the amount of FSM instances with certain type that can be stored in the pool.
Constructor Summary | |
FSMPool()
Constructor. |
Method Summary | |
void |
addFSMInstance(java.lang.Object fsmInstance,
short fsmid)
Add a FSM instance with specified FSM id to the pool. |
void |
addFSMVector(java.util.Vector v,
short fsmid)
Add a vector of FSM instances with specified FSM id to the pool. |
hypercast.I_MessageStoreFSM |
getFSMInstance(short fsmid)
Return a FSM instances with specified FSM id from the pool. |
java.util.Vector |
getFSMVector(short fsmid)
Get the vector of FSM instances with specified FSM id in the pool. |
int |
getMaxNumOfFSMInstances(short fsmid)
Get the maximum number of a certain type FSM instances that the pool can store. |
void |
setMaxNumOfFSMInstances(short fsmid,
int num)
Set the maximum number of a certain type FSM instances that the pool can store. |
Methods inherited from class hypercast.ObjectPool |
addObjInstance, addObjVector, getMaxNumOfObjInstances, getObjInstance, getObjVector, setMaxNumOfObjInstances |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FSMPool()
Method Detail |
public void addFSMVector(java.util.Vector v, short fsmid)
public java.util.Vector getFSMVector(short fsmid)
public void addFSMInstance(java.lang.Object fsmInstance, short fsmid)
public hypercast.I_MessageStoreFSM getFSMInstance(short fsmid)
public void setMaxNumOfFSMInstances(short fsmid, int num)
public int getMaxNumOfFSMInstances(short fsmid)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |