kodo.datacache
Class LRUDataCache
java.lang.Object
   org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
       org.apache.openjpa.datacache.AbstractDataCache
org.apache.openjpa.datacache.AbstractDataCache
           kodo.datacache.LRUDataCache
kodo.datacache.LRUDataCache
- All Implemented Interfaces: 
- Serializable, DataCache, RemoteCommitListener, Configurable, Closeable, EventManager
- public class LRUDataCache 
- extends AbstractDataCache- implements RemoteCommitListener
An lru-based data cache.
- See Also:
- Serialized Form
 
 
 
 
 
 
| Methods inherited from class org.apache.openjpa.datacache.AbstractDataCache | 
| addExpirationListener, afterCommit, clear, close, close, commit, contains, containsAll, endConfiguration, fireEvent, get, getAll, getEvictionSchedule, getName, isClosed, pin, pinAll, pinAll, put, putAllInternal, recacheUpdates, remove, removeAll, removeAll, removeAllInternal, removeAllTypeNamesInternal, removeExpirationListener, setConfiguration, setEvictionSchedule, setName, startConfiguration, toString, unpin, unpinAll, unpinAll, update | 
 
 
 
 
LRUDataCache
public LRUDataCache()
getCacheMap
public CacheMap getCacheMap()
- Returns the underlying CacheMapthat thisLRUDataCacheis using. This is not an unmodifiable
 view on the map, so care should be taken with this
 reference. Implementations should probably not modify the
 contents of the cache, but should only use this reference to
 obtain cache metrics.
 
- 
 
- 
 
setCacheSize
public void setCacheSize(int size)
- Sets the maximum number of unpinned objects to keep hard
 references to. If the map contains more unpinned objects than
 size, then this method will result in the cache
 flushing old values.
 
- 
 
- 
 
getCacheSize
public int getCacheSize()
- Returns the maximum number of unpinned objects to keep hard
 references to.
 
- 
 
- 
 
setSoftReferenceSize
public void setSoftReferenceSize(int size)
- Sets the maximum number of unpinned objects to keep soft
 references to. If the map contains more soft references than
 size, then this method will result in the cache
 flushing values.
 
- 
 
- 
 
getSoftReferenceSize
public int getSoftReferenceSize()
- Returns the maximum number of unpinned objects to keep soft
 references to. Defaults to -1.
 
- 
 
- 
 
initialize
public void initialize(DataCacheManager mgr)
- 
- Specified by:
- initializein interface- DataCache
- Overrides:
- initializein class- AbstractDataCache
 
- 
 
writeLock
public void writeLock()
- 
- Specified by:
- writeLockin interface- DataCache
 
- 
 
writeUnlock
public void writeUnlock()
- 
- Specified by:
- writeUnlockin interface- DataCache
 
- 
 
getInternal
protected DataCachePCData getInternal(Object key)
- 
- Specified by:
- getInternalin class- AbstractDataCache
 
- 
 
putInternal
protected DataCachePCData putInternal(Object key,
                                      DataCachePCData pc)
- 
- Specified by:
- putInternalin class- AbstractDataCache
 
- 
 
removeInternal
protected DataCachePCData removeInternal(Object key)
- 
- Specified by:
- removeInternalin class- AbstractDataCache
 
- 
 
removeAllInternal
protected void removeAllInternal(Class cls,
                                 boolean subs)
- 
- Specified by:
- removeAllInternalin class- AbstractDataCache
 
- 
 
clearInternal
protected void clearInternal()
- 
- Specified by:
- clearInternalin class- AbstractDataCache
 
- 
 
pinInternal
protected boolean pinInternal(Object key)
- 
- Specified by:
- pinInternalin class- AbstractDataCache
 
- 
 
unpinInternal
protected boolean unpinInternal(Object key)
- 
- Specified by:
- unpinInternalin class- AbstractDataCache
 
- 
 
keyRemoved
protected void keyRemoved(Object key,
                          boolean expired)
- 
- Overrides:
- keyRemovedin class- AbstractDataCache
 
- 
 
Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.