org.apache.ojb.broker.cache
Class ObjectCacheJCSImpl

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

public class ObjectCacheJCSImpl
extends java.lang.Object
implements ObjectCache

This local ObjectCache implementation using turbine-JCS to cache objects is primarily for intern use in conjunction with ObjectCacheJCSPerClassImpl implementation. If used as main ObjectCache all cached objects will be cached under the same JCS region name (see JCSHelper.DEFAULT_REGION).

Implementation configuration properties:

Property Key Property Values
- -

Version:
$Id: ObjectCacheJCSImpl.java,v 1.8 2003/09/17 23:00:15 arminw Exp $
Author:
Matthew Baird (mattbaird@yahoo.com);

Constructor Summary
ObjectCacheJCSImpl(PersistenceBroker broker, java.util.Properties prop)
           
ObjectCacheJCSImpl(java.lang.String name)
          Constructor used by the ObjectCacheJCSPerClassImpl
 
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.String getRegionName()
           
 java.lang.Object lookup(Identity oid)
          Lookup object with Identity oid in objectTable.
 void remove(Identity oid)
          removes an Object from the cache.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectCacheJCSImpl

public ObjectCacheJCSImpl(PersistenceBroker broker,
                          java.util.Properties prop)

ObjectCacheJCSImpl

public ObjectCacheJCSImpl(java.lang.String name)
Constructor used by the ObjectCacheJCSPerClassImpl

Method Detail

getRegionName

public java.lang.String getRegionName()

cache

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

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 - the Identity of the object to be removed.

clear

public void clear()
clear the ObjectCache.

Specified by:
clear in interface ObjectCache

toString

public java.lang.String toString()


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