org.ow2.util.pool.impl
Class PoolConfiguration

java.lang.Object
  extended by org.ow2.util.pool.impl.PoolConfiguration
All Implemented Interfaces:
java.io.Serializable, org.ow2.util.pool.api.IPoolConfiguration

public class PoolConfiguration
extends java.lang.Object
implements org.ow2.util.pool.api.IPoolConfiguration, java.io.Serializable

Implementation of the Pool Configuration interface.

Author:
Florent BENOIT
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.ow2.util.pool.api.IPoolConfiguration
DEFAULT_MAX, DEFAULT_MAX_WAITERS, DEFAULT_TIMEOUT
 
Constructor Summary
PoolConfiguration()
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 int getMax()
           
 int getMaxWaiters()
           
 long getTimeout()
           
 int hashCode()
          Returns a hash code value for the pool configuration.
 void setMax(int max)
          Sets the Maximum size of the pool.
 void setMaxWaiters(int maxWaiters)
          Sets the number of waiters that can wait for the given timeout.
 void setTimeout(long timeout)
          Sets the timeout for waiters that are waiting for an empty element in the pool..
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolConfiguration

public PoolConfiguration()
Method Detail

getMax

public int getMax()
Specified by:
getMax in interface org.ow2.util.pool.api.IPoolConfiguration
Returns:
Maximum size of the pool.

setMax

public void setMax(int max)
Sets the Maximum size of the pool.

Specified by:
setMax in interface org.ow2.util.pool.api.IPoolConfiguration
Parameters:
max - the given maximum size of the pool

getTimeout

public long getTimeout()
Specified by:
getTimeout in interface org.ow2.util.pool.api.IPoolConfiguration
Returns:
the timeout for waiters that are waiting for an empty element in the pool.

setTimeout

public void setTimeout(long timeout)
Sets the timeout for waiters that are waiting for an empty element in the pool..

Specified by:
setTimeout in interface org.ow2.util.pool.api.IPoolConfiguration
Parameters:
timeout - the timeout for waiters that are waiting for an empty element in the pool.

getMaxWaiters

public int getMaxWaiters()
Specified by:
getMaxWaiters in interface org.ow2.util.pool.api.IPoolConfiguration
Returns:
the number of waiters that can wait for the given timeout. If this number is reached, there is no wait and an exception is thrown.

setMaxWaiters

public void setMaxWaiters(int maxWaiters)
Sets the number of waiters that can wait for the given timeout.

Specified by:
setMaxWaiters in interface org.ow2.util.pool.api.IPoolConfiguration
Parameters:
maxWaiters - the number of waiters that can wait for the given timeout.

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
object - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the pool configuration.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this pool configuration.


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.