org.apache.ojb.broker.cache
Class CacheDistributor
java.lang.Object
org.apache.ojb.broker.cache.AbstractMetaCache
org.apache.ojb.broker.cache.CacheDistributor
- All Implemented Interfaces:
- ObjectCache
- public class CacheDistributor
- extends AbstractMetaCache
A intern used AbstractMetaCache
implementation acting
as distributor of ObjectCache
implementations declared
in configuration metadata.
Reads the name of the used ObjectCache implementation
a) from class-descriptor, or if not found
b) from jdbc-connection-descriptor, or if not found
use a given standard ObjectCache implementation (given by
constructor argument).
- Version:
- $Id: CacheDistributor.java,v 1.7 2004/04/04 23:53:33 brianm Exp $
- Author:
- Matthew Baird (mattbaird@yahoo.com), Armin Waibel
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CacheDistributor
public CacheDistributor(PersistenceBroker broker,
ObjectCache defaultCache)
- public Default Constructor
clear
public void clear()
- Description copied from interface:
ObjectCache
- clear the ObjectCache.
getCache
public ObjectCache getCache(Identity oid,
java.lang.Object obj,
int callingMethod)
- Description copied from class:
AbstractMetaCache
- This method handle all calls against the
ObjectCache
interface.
Note: The parameter obj
can be null
- e.g. when
lookup or remove method was called.
- Specified by:
getCache
in class AbstractMetaCache
- Parameters:
oid
- Identity of the target object.obj
- The target object itself or null
if not available.callingMethod
- Specifies the type of method call against the ObjectCache
interface. AbstractMetaCache.METHOD_CACHE
, AbstractMetaCache.METHOD_LOOKUP
, AbstractMetaCache.METHOD_REMOVE
.
- Returns:
- The
ObjectCache
implementation.
toString
public java.lang.String toString()
(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.1, 2004-09-08