Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.ojb.broker.cache
Class ObjectCacheJCSImpl  view ObjectCacheJCSImpl download ObjectCacheJCSImpl.java

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

public class ObjectCacheJCSImpl
extends java.lang.Object
implements ObjectCache

Version:
$Id: ObjectCacheJCSImpl.java,v 1.4 2002/11/21 09:37:29 brj Exp $

Field Summary
private  JCS m_region
           
private  java.lang.String m_regionName
          if no regionname is passed in, we use the default region.
 
Constructor Summary
ObjectCacheJCSImpl()
           
ObjectCacheJCSImpl(java.lang.String name)
           
 
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 cache(java.lang.Object obj)
          Make object obj persistent to Objectcache.
 void clear()
          clear the ObjectCache.
private  void ensureOpen()
           
 java.lang.String getRegionName()
           
 java.lang.Object lookup(org.apache.ojb.broker.Identity oid)
          Lookup object with Identity oid in objectTable.
 void remove(java.lang.Object obj)
          removes an Object from the cache.
 void setRegionName(java.lang.String region)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_region

private JCS m_region

m_regionName

private java.lang.String m_regionName
if no regionname is passed in, we use the default region.

Constructor Detail

ObjectCacheJCSImpl

public ObjectCacheJCSImpl()

ObjectCacheJCSImpl

public ObjectCacheJCSImpl(java.lang.String name)
Method Detail

ensureOpen

private void ensureOpen()

cache

public void cache(java.lang.Object obj)
           throws org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException
Make object obj persistent to Objectcache. compute objects identity and use it as key for the hashmap

Specified by:
cache in interface ObjectCache

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 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 ObjectCache

remove

public void remove(java.lang.Object obj)
removes an Object from the cache.

Specified by:
remove in interface ObjectCache

setRegionName

public void setRegionName(java.lang.String region)

getRegionName

public java.lang.String getRegionName()

clear

public void clear()
clear the ObjectCache.

Specified by:
clear in interface ObjectCache