|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnf.fr.eraasoft.pool.PoolSettings<T>
T - public class PoolSettings<T>
Classe used to configure your object pooling. Instance of this classes must be used in a Singleton context (static variable).
| Field Summary | |
|---|---|
static int |
DEFAUL_MAX_WAIT
Wait (in second) before |
static int |
DEFAULT_MAX
|
static int |
DEFAULT_MIN
|
static int |
DEFAULT_TIME_BETWEEN_TWO_CONTROLE
Control thread |
| Constructor Summary | |
|---|---|
PoolSettings(PoolableObject<T> poolableObject)
Create a new PoolSetting instance with a Poolable object |
|
| Method Summary | |
|---|---|
void |
clearCurrentPool()
|
boolean |
debug()
|
PoolSettings<T> |
debug(boolean debug)
|
int |
max()
|
PoolSettings<T> |
max(int max)
if |
int |
maxIdle()
|
PoolSettings<T> |
maxIdle(int maxIdle)
|
int |
maxWait()
|
PoolSettings<T> |
maxWait(int maxWait)
|
int |
min()
|
PoolSettings<T> |
min(int min)
Define the minimum number of element in the pool |
ObjectPool<T> |
pool()
|
static void |
shutdown()
|
static int |
timeBetweenTwoControls()
|
static void |
timeBetweenTwoControls(int time)
|
boolean |
validateWhenReturn()
|
PoolSettings<T> |
validateWhenReturn(boolean validateWhenReturn)
if true invoke PoolableObject.validate() method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAUL_MAX_WAIT
public static final int DEFAULT_MIN
public static final int DEFAULT_MAX
public static final int DEFAULT_TIME_BETWEEN_TWO_CONTROLE
| Constructor Detail |
|---|
public PoolSettings(PoolableObject<T> poolableObject)
poolableObject - | Method Detail |
|---|
public static void timeBetweenTwoControls(int time)
public static int timeBetweenTwoControls()
public ObjectPool<T> pool()
public PoolSettings<T> maxIdle(int maxIdle)
public int maxIdle()
public PoolSettings<T> maxWait(int maxWait)
public PoolSettings<T> min(int min)
min -
public PoolSettings<T> max(int max)
max -
public int min()
public int maxWait()
public int max()
public static void shutdown()
public PoolSettings<T> validateWhenReturn(boolean validateWhenReturn)
validateWhenReturn -
public boolean validateWhenReturn()
public PoolSettings<T> debug(boolean debug)
public boolean debug()
public void clearCurrentPool()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||