snaq.util
Class ObjectPoolEvent
java.lang.Object
java.util.EventObject
snaq.util.ObjectPoolEvent
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ConnectionPoolEvent
public class ObjectPoolEvent
- extends EventObject
Event for ObjectPool
instances.
Convenience methods are available for determining the type fo the event,
and the event is capable of keeping shadow copies of the pool's vital
parameters at the time the event was issued, for reference to listeners.
- Author:
- Giles Winstanley
- See Also:
- Serialized Form
INIT_COMPLETED
public static final int INIT_COMPLETED
- See Also:
- Constant Field Values
CHECKOUT
public static final int CHECKOUT
- See Also:
- Constant Field Values
CHECKIN
public static final int CHECKIN
- See Also:
- Constant Field Values
VALIDATION_ERROR
public static final int VALIDATION_ERROR
- See Also:
- Constant Field Values
MAX_POOL_LIMIT_REACHED
public static final int MAX_POOL_LIMIT_REACHED
- See Also:
- Constant Field Values
MAX_POOL_LIMIT_EXCEEDED
public static final int MAX_POOL_LIMIT_EXCEEDED
- See Also:
- Constant Field Values
MAX_SIZE_LIMIT_REACHED
public static final int MAX_SIZE_LIMIT_REACHED
- See Also:
- Constant Field Values
MAX_SIZE_LIMIT_ERROR
public static final int MAX_SIZE_LIMIT_ERROR
- See Also:
- Constant Field Values
PARAMETERS_CHANGED
public static final int PARAMETERS_CHANGED
- See Also:
- Constant Field Values
POOL_FLUSHED
public static final int POOL_FLUSHED
- See Also:
- Constant Field Values
POOL_RELEASED
public static final int POOL_RELEASED
- See Also:
- Constant Field Values
ObjectPoolEvent
public ObjectPoolEvent(ObjectPool pool,
int type)
- Creates a new
PoolEvent
.
getPool
public ObjectPool getPool()
- Returns the pool for which this event was created.
getType
public int getType()
- Returns the type of event this object represents.
getTypeString
public String getTypeString()
- Returns the type of event this object represents as a string.
toString
public String toString()
- Overrides:
toString
in class EventObject
isPoolInitCompleted
public boolean isPoolInitCompleted()
isPoolCheckOut
public boolean isPoolCheckOut()
isPoolCheckIn
public boolean isPoolCheckIn()
isValidationError
public boolean isValidationError()
isMaxPoolLimitReached
public boolean isMaxPoolLimitReached()
isMaxPoolLimitExceeded
public boolean isMaxPoolLimitExceeded()
isMaxSizeLimitReached
public boolean isMaxSizeLimitReached()
isMaxSizeLimitError
public boolean isMaxSizeLimitError()
isPoolParametersChanged
public boolean isPoolParametersChanged()
isPoolFlushed
public boolean isPoolFlushed()
isPoolReleased
public boolean isPoolReleased()
getMinPool
public int getMinPool()
getMaxPool
public int getMaxPool()
getMaxSize
public int getMaxSize()
getIdleTimeout
public long getIdleTimeout()
getCheckedOut
public int getCheckedOut()
getFreeCount
public int getFreeCount()
getSize
public int getSize()
getPoolHitRate
public float getPoolHitRate()