org.apache.ojb.broker.cache
Class ObjectCacheFactory

java.lang.Object
  extended byorg.apache.ojb.broker.util.factory.ConfigurableFactory
      extended byorg.apache.ojb.broker.cache.ObjectCacheFactory
All Implemented Interfaces:
Configurable

public class ObjectCacheFactory
extends ConfigurableFactory

Factory for ObjectCache implementation classes. Each given PersistenceBroker was associated with its own ObjectCache instance and vice versa.

Version:
$Id: ObjectCacheFactory.java,v 1.15 2003/12/31 12:01:56 arminw Exp $
Author:
Thomas Mahler

Constructor Summary
ObjectCacheFactory()
           
 
Method Summary
protected  ObjectCache createNewCacheInstance(java.lang.Class target, PersistenceBroker broker, java.util.Properties prop)
           
 ObjectCache createObjectCache(PersistenceBroker broker)
          Creates a new ObjectCache instance.
protected  java.lang.String getConfigurationKey()
          must be implemented in the concrete factory classes.
static ObjectCacheFactory getInstance()
          Get the ObjectCacheFactory instance.
 
Methods inherited from class org.apache.ojb.broker.util.factory.ConfigurableFactory
buildArgumentString, configure, createNewInstance, createNewInstance, createNewInstance, getClassToServe, getLogger, setClassToServe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectCacheFactory

public ObjectCacheFactory()
Method Detail

getInstance

public static ObjectCacheFactory getInstance()
Get the ObjectCacheFactory instance.


createObjectCache

public ObjectCache createObjectCache(PersistenceBroker broker)
Creates a new ObjectCache instance. Each ObjectCache implementation was wrapped by a CacheDistributor instance and if cache filtering is enabled by a CacheFilterRegistry instance too.

Parameters:
broker - The PB instance to associate with the cache instance

getConfigurationKey

protected java.lang.String getConfigurationKey()
Description copied from class: ConfigurableFactory
must be implemented in the concrete factory classes. the configuration key is used to lookup the Class to serve from the OjbConfiguration in configure().

Specified by:
getConfigurationKey in class ConfigurableFactory
See Also:
ConfigurableFactory.getConfigurationKey()

createNewCacheInstance

protected ObjectCache createNewCacheInstance(java.lang.Class target,
                                             PersistenceBroker broker,
                                             java.util.Properties prop)
                                      throws java.lang.Exception
Throws:
java.lang.Exception


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14