org.sadun.util.pool2
Class Configuration

java.lang.Object
  extended byorg.sadun.util.pool2.Configuration

public class Configuration
extends java.lang.Object

An object definining the configuration for a given object pool.

Author:
Cristiano Sadun

Constructor Summary
Configuration(java.io.File storageDirectory, int poolSize)
          Create a configuration object with the given parameters but associating an default passivation manager to the configured pool.
Configuration(java.io.File storageDirectory, int poolSize, ObjectPool.PassivationManagerFactory passivationManagerFactory)
          Create a configuration object with the given parameters.
Configuration(int poolSize)
          Create a configuration object with the given parameters but usin the system's temporary directory as storage directory and associating an default passivation manager to the configured pool.
 
Method Summary
 ObjectPool.PassivationManagerFactory getPassivationManagerFactory()
          Returns the passivationManagerFactory.
 int getPoolSize()
          Returns the poolSize.
 java.io.File getStorageDirectory()
          Returns the storageDirectory.
 void setPassivationManagerFactory(ObjectPool.PassivationManagerFactory passivationThreadFactory)
          Sets the passivationManagerFactory.
 void setPoolSize(int poolSize)
          Sets the poolSize.
 void setStorageDirectory(java.io.File storageDirectory)
          Sets the storageDirectory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(java.io.File storageDirectory,
                     int poolSize,
                     ObjectPool.PassivationManagerFactory passivationManagerFactory)
Create a configuration object with the given parameters.

Parameters:
storageDirectory - the directory where to store passivated object
poolSize - the desired size of the pool

Configuration

public Configuration(java.io.File storageDirectory,
                     int poolSize)
Create a configuration object with the given parameters but associating an default passivation manager to the configured pool.

Parameters:
storageDirectory - the directory where to store passivated object
poolSize - the desired size of the pool

Configuration

public Configuration(int poolSize)
Create a configuration object with the given parameters but usin the system's temporary directory as storage directory and associating an default passivation manager to the configured pool.

Parameters:
poolSize - the desired size of the pool
Method Detail

getStorageDirectory

public java.io.File getStorageDirectory()
Returns the storageDirectory.

Returns:
File

setStorageDirectory

public void setStorageDirectory(java.io.File storageDirectory)
Sets the storageDirectory.

Parameters:
storageDirectory - The storageDirectory to set

getPoolSize

public int getPoolSize()
Returns the poolSize.

Returns:
int

setPoolSize

public void setPoolSize(int poolSize)
Sets the poolSize.

Parameters:
poolSize - The poolSize to set

getPassivationManagerFactory

public ObjectPool.PassivationManagerFactory getPassivationManagerFactory()
Returns the passivationManagerFactory.

Returns:
ExtendedObjectPool.PassivationManagerFactory

setPassivationManagerFactory

public void setPassivationManagerFactory(ObjectPool.PassivationManagerFactory passivationThreadFactory)
Sets the passivationManagerFactory.