|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.epam.common.thread.runnable.FixedRunnablePool<T>
public class FixedRunnablePool<T extends RunnableObject>
Pool have fixed size.
Create new objects if pool is empty.
Skip objects if the pool is full. Object should be collected by GC in this case. User: Mykhailo_Sereda Date: 05.11.12 Time: 15:18
Constructor Summary | |
---|---|
FixedRunnablePool(int minSize,
int maxSize,
RunnableFactory<T> objectFactory)
|
Method Summary | |
---|---|
protected T |
createNew()
|
T |
get()
Get object from pool. |
void |
release(T ob)
Try return object to the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedRunnablePool(int minSize, int maxSize, RunnableFactory<T> objectFactory)
Method Detail |
---|
public T get()
get
in interface RunnablePool<T extends RunnableObject>
protected T createNew()
public void release(T ob)
release
in interface RunnablePool<T extends RunnableObject>
ob
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |