gov.nih.nci.caarray.services.util.cache
Class ObjectCacheEHCacheImpl

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.cache.ObjectCacheEHCacheImpl
All Implemented Interfaces:
org.apache.ojb.broker.cache.ObjectCache

public class ObjectCacheEHCacheImpl
extends java.lang.Object
implements org.apache.ojb.broker.cache.ObjectCache

This has been adapted to use EHCache

Implementation configuration properties:

Property Key Property Values
- -


Constructor Summary
ObjectCacheEHCacheImpl(org.apache.ojb.broker.PersistenceBroker broker, java.util.Properties props)
          Constructor for the MetaObjectCachePerClassImpl object
ObjectCacheEHCacheImpl(java.lang.String name)
          Constructor used by the ObjectCacheEHCachePerClassImpl
 
Method Summary
 void cache(org.apache.ojb.broker.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(org.apache.ojb.broker.Identity oid)
          Lookup object with Identity oid in objectTable.
 void remove(org.apache.ojb.broker.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

ObjectCacheEHCacheImpl

public ObjectCacheEHCacheImpl(org.apache.ojb.broker.PersistenceBroker broker,
                              java.util.Properties props)
Constructor for the MetaObjectCachePerClassImpl object


ObjectCacheEHCacheImpl

public ObjectCacheEHCacheImpl(java.lang.String name)
Constructor used by the ObjectCacheEHCachePerClassImpl

Method Detail

getRegionName

public java.lang.String getRegionName()

cache

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

Specified by:
cache in interface org.apache.ojb.broker.cache.ObjectCache

lookup

public java.lang.Object lookup(org.apache.ojb.broker.Identity oid)
Lookup object with Identity oid in objectTable. returns null if no matching id is found

Specified by:
lookup in interface org.apache.ojb.broker.cache.ObjectCache

remove

public void remove(org.apache.ojb.broker.Identity oid)
removes an Object from the cache.

Specified by:
remove in interface org.apache.ojb.broker.cache.ObjectCache
Parameters:
oid - the Identity of the object to be removed.

clear

public void clear()
clear the ObjectCache.

Specified by:
clear in interface org.apache.ojb.broker.cache.ObjectCache

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object