T
- the type of objects held in this object poolpublic abstract class AbstractValidatingPoolService<T> extends AbstractBasePoolService implements BasePoolService
Modifier and Type | Method and Description |
---|---|
int |
createdTotal()
Returns the total number of created objects which currently exist for this object pool.
|
int |
initialSize()
Returns the
initialSize of this object pool at construction time. |
boolean |
isFair()
Returns the fairness setting of this object pool.
|
boolean |
isTerminated()
Returns the current terminated state of this object pool.
|
int |
maxSize()
Returns the
maxSize of this object pool. |
int |
reduceCreated(int reduction,
boolean ignoreInitialSize)
Tries to remove (and destroy) up to
reduction objects from the object pool. |
int |
remainingCapacity()
Returns the remaining capacity of this object pool, i.e.
|
void |
terminate()
Terminates this object pool.
|
drainCreated, remainingCreated, taken, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
drainCreated, remainingCreated, taken
public int createdTotal()
BasePoolService.taken()
+ BasePoolService.remainingCreated()
.
Typically used for testing an debugging purposes.createdTotal
in interface BasePoolService
public int remainingCapacity()
BasePoolService.remainingCreated()
.
Typically used for testing an debugging purposes.remainingCapacity
in interface BasePoolService
public int initialSize()
initialSize
of this object pool at construction time.
This parameter never changes.initialSize
in interface BasePoolService
initialSize
public int maxSize()
maxSize
of this object pool. This parameter never changes.maxSize
in interface BasePoolService
maxSize
public int reduceCreated(int reduction, boolean ignoreInitialSize)
reduction
objects from the object pool.
May bring the object pool's BasePoolService.createdTotal()
to less then its BasePoolService.initialSize()
.reduceCreated
in interface BasePoolService
reduction
- the desired amount of objects to be removedignoreInitialSize
- specifies whether the BasePoolService.createdTotal()
may be
reduced to less than BasePoolService.initialSize()
public void terminate()
terminate
in interface BasePoolService
public boolean isTerminated()
isTerminated
in interface BasePoolService
true
if the object pool is terminatedpublic boolean isFair()
isFair
in interface BasePoolService
true
if the object pool is fair to waiting taker threadsCopyright © 2013-2014 Simeon Malchev. All Rights Reserved.