org.objectweb.perseus.pool.api

Interface PoolAttributes

All Superinterfaces:
AttributeController
Known Implementing Classes:
ArrayListPool, LArrayPool

public interface PoolAttributes
extends AttributeController

This interafece contains the accessor methods (getters and setters) which permit to tune a Pool:

Author:
S.Chassande-Barrioz

Method Summary

int
getMaxSize()
getMaxSize retrieves the maximum size assigned to this Pool.
int
getMinSize()
getMinSize retrieves the minimum size assigned to this Pool.
long
getTTL()
getTTL retrieves the time to live of pool resources (in milisecond).
long
getTimeout()
getTimeout retrieves the timeout assigned to this Pool.
void
setMaxSize(int maxsize)
setMaxSize assigns a maximum size to this Pool.
void
setMinSize(int minsize)
setMinSize assigns a minimum size to this Pool.
void
setTTL(long ttl)
setTTL assignes the time (in milisecond) to live of pool resources.
void
setTimeout(long crto)
setTimeout assigns a timeout to this Pool.

Method Details

getMaxSize

public int getMaxSize()
getMaxSize retrieves the maximum size assigned to this Pool.

Returns:
The maximum size currently assigned to this Pool.


getMinSize

public int getMinSize()
getMinSize retrieves the minimum size assigned to this Pool.

Returns:
The minimum size currently assigned to this Pool.


getTTL

public long getTTL()
getTTL retrieves the time to live of pool resources (in milisecond).


getTimeout

public long getTimeout()
getTimeout retrieves the timeout assigned to this Pool.

Returns:
The timeout currently assigned to this Pool.


setMaxSize

public void setMaxSize(int maxsize)
            throws Exception
setMaxSize assigns a maximum size to this Pool.

Parameters:
maxsize - The maximum size to be assigned.


setMinSize

public void setMinSize(int minsize)
            throws Exception
setMinSize assigns a minimum size to this Pool.

Parameters:
minsize - The minimum size to be assigned.


setTTL

public void setTTL(long ttl)
setTTL assignes the time (in milisecond) to live of pool resources. If the value is lesser or equal to 0 then pool resources do not have a TTL.


setTimeout

public void setTimeout(long crto)
setTimeout assigns a timeout to this Pool.

Parameters:
crto - The timeout to be assigned.


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.