|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.runtime.Pool
jist.runtime.Pool.EventPool
public static class Pool.EventPool
Implements an object pool for the massively used Event objects. Note that, for performance reasons, this class is intentionally NOT thread-safe.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jist.runtime.Pool |
|---|
Pool.ArrayPool, Pool.ContinuationPool, Pool.EventPool |
| Field Summary | |
|---|---|
private int |
count
Index into object pool. |
private Event[] |
pool
Private object pool. |
| Constructor Summary | |
|---|---|
Pool.EventPool(int size)
Create new object pool of fixed given size. |
|
| Method Summary | |
|---|---|
Event |
get()
Return an event from pool, or create new one if pool empty. |
void |
put(Event e)
Place a free (otherwise unused) Event object back in the pool, if there is space. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Event[] pool
private int count
| Constructor Detail |
|---|
public Pool.EventPool(int size)
size - object pool size| Method Detail |
|---|
public Event get()
public void put(Event e)
e - reference to free event object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||