org.ow2.util.pool.api
Interface IPoolConfiguration


public interface IPoolConfiguration

Defines the attributes that can be set on the pool in order to configure it.

Author:
Florent BENOIT

Field Summary
static int DEFAULT_MAX
          Default max is unlimited.
static int DEFAULT_MAX_WAITERS
          Default max waiters = 1000.
static long DEFAULT_TIMEOUT
          Default timeout = 10 second.
 
Method Summary
 int getMax()
           
 int getMaxWaiters()
           
 long getTimeout()
           
 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..
 

Field Detail

DEFAULT_MAX

static final int DEFAULT_MAX
Default max is unlimited.

See Also:
Constant Field Values

DEFAULT_TIMEOUT

static final long DEFAULT_TIMEOUT
Default timeout = 10 second.

See Also:
Constant Field Values

DEFAULT_MAX_WAITERS

static final int DEFAULT_MAX_WAITERS
Default max waiters = 1000.

See Also:
Constant Field Values
Method Detail

getMax

int getMax()
Returns:
Maximum size of the pool.

setMax

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

Parameters:
max - the given maximum size of the pool

getTimeout

long getTimeout()
Returns:
the timeout for waiters that are waiting for an empty element in the pool.

setTimeout

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

Parameters:
timeout - the timeout for waiters that are waiting for an empty element in the pool.

getMaxWaiters

int getMaxWaiters()
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

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

Parameters:
maxWaiters - the number of waiters that can wait for the given timeout.


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