|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.cache.ObjectCacheSoftImpl
public class ObjectCacheSoftImpl
A global ObjectCache
implementation.
Nested Class Summary | |
---|---|
static class |
ObjectCacheSoftImpl.SoftHashMap
Kind of map using SoftReference to store values |
Constructor Summary | |
---|---|
ObjectCacheSoftImpl(PersistenceBroker broker,
java.util.Properties properties)
Constructor called by ojb |
Method Summary | |
---|---|
void |
cache(Identity oid,
java.lang.Object obj)
Used to cache objects by it's Identity . |
boolean |
cacheIfNew(Identity oid,
java.lang.Object obj)
|
void |
clear()
Clear the cache. |
void |
configure(org.apache.ojb.broker.util.configuration.Configuration configuration)
configure an object using the Configuration pConfig |
java.lang.Object |
lookup(Identity oid)
Lookup object with Identity 'oid' in cache. |
void |
remove(Identity oid)
Removes an Object from the cache. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectCacheSoftImpl(PersistenceBroker broker, java.util.Properties properties)
broker
- ignored parameterproperties
- ignored parameterMethod Detail |
---|
public void configure(org.apache.ojb.broker.util.configuration.Configuration configuration) throws org.apache.ojb.broker.util.configuration.ConfigurationException
org.apache.ojb.broker.util.configuration.Configurable
configure
in interface org.apache.ojb.broker.util.configuration.Configurable
configuration
- the Configuration object used to configure current instance
org.apache.ojb.broker.util.configuration.ConfigurationException
Configurable.configure(org.apache.ojb.broker.util.configuration.Configuration)
public void cache(Identity oid, java.lang.Object obj)
ObjectCache
Identity
.
cache
in interface ObjectCache
oid
- Identity of the object to cache.obj
- The object to cache.ObjectCache.cache(org.apache.ojb.broker.Identity, java.lang.Object)
public boolean cacheIfNew(Identity oid, java.lang.Object obj)
public java.lang.Object lookup(Identity oid)
ObjectCache
lookup
in interface ObjectCache
oid
- Identity of the object to search for.
Identity
is found.ObjectCache.lookup(org.apache.ojb.broker.Identity)
public void remove(Identity oid)
ObjectCache
remove
in interface ObjectCache
oid
- Identity of the object to be removed.ObjectCache.remove(org.apache.ojb.broker.Identity)
public void clear()
ObjectCache
clear
in interface ObjectCache
ObjectCache.clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |