org.apache.ojb.broker.cache
Class ObjectCacheEmptyImpl

java.lang.Object
  extended by org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
All Implemented Interfaces:
ObjectCache

public class ObjectCacheEmptyImpl
extends Object
implements ObjectCache

This is an 'empty' ObjectCache implementation. Useful when caching was not desired.
NOTE: This implementation does not prevent infinite loops caused by 'circular references' of loaded object graphs. (this will change in versions > 1.0).

Implementation configuration properties:

Property Key Property Values
- -

Version:
$Id: ObjectCacheEmptyImpl.java,v 1.1 2007-08-24 22:17:29 ewestfal Exp $
Author:
Thomas Mahler

Constructor Summary
ObjectCacheEmptyImpl(PersistenceBroker broker, Properties prop)
           
 
Method Summary
 void cache(Identity oid, Object obj)
          Used to cache objects by it's Identity.
 void clear()
          Clear the cache.
 Object lookup(Identity oid)
          Lookup object with Identity 'oid' in cache.
 void remove(Identity oid)
          Removes an Object from the cache.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectCacheEmptyImpl

public ObjectCacheEmptyImpl(PersistenceBroker broker,
                            Properties prop)
Method Detail

cache

public void cache(Identity oid,
                  Object obj)
Description copied from interface: ObjectCache
Used to cache objects by it's Identity.

Specified by:
cache in interface ObjectCache
Parameters:
oid - Identity of the object to cache.
obj - The object to cache.
See Also:
ObjectCache.cache(Identity, Object)

lookup

public Object lookup(Identity oid)
Description copied from interface: ObjectCache
Lookup object with Identity 'oid' in cache.

Specified by:
lookup in interface ObjectCache
Parameters:
oid - Identity of the object to search for.
Returns:
The cached object or null if no matching object for specified Identity is found.
See Also:
ObjectCache.lookup(Identity)

remove

public void remove(Identity oid)
Description copied from interface: ObjectCache
Removes an Object from the cache.

Specified by:
remove in interface ObjectCache
Parameters:
oid - Identity of the object to be removed.
See Also:
ObjectCache.remove(Identity)

clear

public void clear()
Description copied from interface: ObjectCache
Clear the cache.

Specified by:
clear in interface ObjectCache
See Also:
ObjectCache.clear()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.