public class FixedRunnablePool<T extends RunnableObject> extends Object implements RunnablePool<T>
Constructor and Description |
---|
FixedRunnablePool(int minSize,
int maxSize,
RunnableFactory<T> objectFactory) |
Modifier and Type | Method and Description |
---|---|
protected T |
createNew() |
T |
get()
Get object from pool.
|
void |
release(T ob)
Try return object to the pool.
|
public FixedRunnablePool(int minSize, int maxSize, RunnableFactory<T> objectFactory)
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
- Copyright © 2000–2022 EPAM Systems. All rights reserved.