org.apache.ojb.broker.cache
Class ObjectCacheSoftImpl
java.lang.Object
org.apache.ojb.broker.cache.ObjectCacheSoftImpl
- All Implemented Interfaces:
- ObjectCache
- public final class ObjectCacheSoftImpl
- extends java.lang.Object
- implements ObjectCache
This global ObjectCache
implementation relies on
JDK1.4 features like the LinkedHashMap.
Thus it can not be used under JDK1.3 or below.
- Version:
- $Id: $
- Author:
- matthew.baird
Method Summary |
void |
cache(Identity oid,
java.lang.Object obj)
makes object obj persistent to the Objectcache under the key oid. |
void |
clear()
clear the ObjectCache. |
java.lang.Object |
lookup(Identity oid)
Lookup object with Identity oid in objectTable. |
void |
remove(Identity oid)
removes an Object from the cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_hardSize
int m_hardSize
ObjectCacheSoftImpl
public ObjectCacheSoftImpl()
ObjectCacheSoftImpl
public ObjectCacheSoftImpl(int hardSize)
cache
public final void cache(Identity oid,
java.lang.Object obj)
- Description copied from interface:
ObjectCache
- makes object obj persistent to the Objectcache under the key oid.
- Specified by:
cache
in interface ObjectCache
lookup
public final java.lang.Object lookup(Identity oid)
- Description copied from interface:
ObjectCache
- Lookup object with Identity oid in objectTable.
returns null if no matching id is found
- Specified by:
lookup
in interface ObjectCache
remove
public final 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.
clear
public final void clear()
- Description copied from interface:
ObjectCache
- clear the ObjectCache.
- Specified by:
clear
in interface ObjectCache
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