org.apache.ojb.broker.cache
Class ObjectCacheUnlimitedImpl

java.lang.Object
  extended byorg.apache.ojb.broker.cache.ObjectCacheUnlimitedImpl
All Implemented Interfaces:
ObjectCache

public class ObjectCacheUnlimitedImpl
extends java.lang.Object
implements ObjectCache

Global ObjectCache implementation.

Version:
$Id: $
Author:
matthew.baird

Field Summary
protected static java.util.Map objectTable
          the hashtable holding all cached object
 
Constructor Summary
ObjectCacheUnlimitedImpl(PersistenceBroker broker, java.util.Properties prop)
          public Default Constructor
 
Method Summary
 void cache(Identity oid, java.lang.Object obj)
          Makes object persistent to the Objectcache
 void clear()
          Clear 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
 

Field Detail

objectTable

protected static java.util.Map objectTable
the hashtable holding all cached object

Constructor Detail

ObjectCacheUnlimitedImpl

public ObjectCacheUnlimitedImpl(PersistenceBroker broker,
                                java.util.Properties prop)
public Default Constructor

Method Detail

clear

public void clear()
Clear ObjectCache. I.e. remove all entries for classes and objects.

Specified by:
clear in interface ObjectCache

cache

public void cache(Identity oid,
                  java.lang.Object obj)
Makes object persistent to the Objectcache

Specified by:
cache in interface ObjectCache

lookup

public java.lang.Object lookup(Identity oid)
Lookup object with Identity oid in objectTable. Returns null if no matching id is found

Specified by:
lookup in interface ObjectCache

remove

public void remove(Identity oid)
Removes an Object from the cache.

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


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