All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vnet.yawb.YAWBBackendManager

java.lang.Object
   |
   +----vnet.yawb.YAWBBackendManager

public class YAWBBackendManager
extends Object
Maintains a cache of backends and performs data retrievals.


Variable Index

 o BACKEND_CLASS
 o BACKEND_ID
 o backends
Available backends.
 o CACHE_MAX_SIZE
 o DEFAULT_MAX_CACHE_SIZE
 o maxCache
Backend connection max cache size.

Constructor Index

 o YAWBBackendManager(Properties)
Constructs a new YAWBBackendManager.

Method Index

 o getConnection(YAWBBackendManager. BackendStore)
Returns a spare connection.
 o getDataStore(YAWBStoreElement)
Retrieves a data store based on a YAWBStoreElement.
 o returnConnection(YAWBBackendConnection)
Returns a connection the cache.

Variables

 o backends
 protected Hashtable backends
Available backends.

 o maxCache
 protected int maxCache
Backend connection max cache size.

 o BACKEND_CLASS
 public static final String BACKEND_CLASS
 o BACKEND_ID
 public static final String BACKEND_ID
 o CACHE_MAX_SIZE
 public static final String CACHE_MAX_SIZE
 o DEFAULT_MAX_CACHE_SIZE
 public static final int DEFAULT_MAX_CACHE_SIZE

Constructors

 o YAWBBackendManager
 public YAWBBackendManager(Properties conf) throws YAWBException, NullPointerException
Constructs a new YAWBBackendManager.

Parameters:
conf - non-null backend properties.
Throws: YAWBException
if a configurationerror occurs
Throws: NullPointerException
if conf is null

Methods

 o getDataStore
 public YAWBDataStore getDataStore(YAWBStoreElement source) throws YAWBException
Retrieves a data store based on a YAWBStoreElement.

Parameters:
source - a source element, may not be null
Returns:
a data store
Throws: YAWBException
if a YAWB error occured
 o returnConnection
 protected void returnConnection(YAWBBackendConnection conn)
Returns a connection the cache. This should be called after a connection and and YAWBDataStores that originated from it have been finished with.

Parameters:
conn - the no-longer-required connection to be added back to the cache
 o getConnection
 protected YAWBBackendConnection getConnection(YAWBBackendManager. BackendStore store) throws YAWBException
Returns a spare connection.

Throws: YAWBException
if a YAWB error occured

All Packages  Class Hierarchy  This Package  Previous  Next  Index