|
Kodo 4.1.0 generated on October 9 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
org.apache.openjpa.datacache.AbstractDataCache
kodo.datacache.LRUDataCache
public class LRUDataCache
An lru-based data cache.
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.datacache.AbstractDataCache |
|---|
conf, log |
| Fields inherited from interface org.apache.openjpa.datacache.DataCache |
|---|
NAME_DEFAULT |
| Constructor Summary | |
|---|---|
LRUDataCache()
|
|
| Method Summary | |
|---|---|
protected void |
clearInternal()
|
org.apache.openjpa.util.CacheMap |
getCacheMap()
Returns the underlying CacheMap that this
LRUDataCache is using. |
int |
getCacheSize()
Returns the maximum number of unpinned objects to keep hard references to. |
protected org.apache.openjpa.datacache.DataCachePCData |
getInternal(Object key)
|
int |
getSoftReferenceSize()
Returns the maximum number of unpinned objects to keep soft references to. |
void |
initialize(org.apache.openjpa.datacache.DataCacheManager mgr)
|
protected boolean |
pinInternal(Object key)
|
protected org.apache.openjpa.datacache.DataCachePCData |
putInternal(Object key,
org.apache.openjpa.datacache.DataCachePCData pc)
|
protected void |
removeAllInternal(Class cls,
boolean subs)
|
protected org.apache.openjpa.datacache.DataCachePCData |
removeInternal(Object key)
|
void |
setCacheSize(int size)
Sets the maximum number of unpinned objects to keep hard references to. |
void |
setSoftReferenceSize(int size)
Sets the maximum number of unpinned objects to keep soft references to. |
protected boolean |
unpinInternal(Object key)
|
void |
writeLock()
|
void |
writeUnlock()
|
| Methods inherited from class org.apache.openjpa.datacache.AbstractDataCache |
|---|
addExpirationListener, afterCommit, clear, close, close, commit, contains, containsAll, endConfiguration, fireEvent, get, getEvictionSchedule, getName, isClosed, keyRemoved, pin, pinAll, pinAll, put, putAllInternal, recacheUpdates, remove, removeAll, removeAll, removeAllInternal, removeAllTypeNamesInternal, removeExpirationListener, setConfiguration, setEvictionSchedule, setName, startConfiguration, toString, unpin, unpinAll, unpinAll, update |
| Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager |
|---|
addListener, fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, removeListener, setFailFast |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.openjpa.event.RemoteCommitListener |
|---|
afterCommit, close |
| Constructor Detail |
|---|
public LRUDataCache()
| Method Detail |
|---|
public org.apache.openjpa.util.CacheMap getCacheMap()
CacheMap that this
LRUDataCache is 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.
public void setCacheSize(int size)
size, then this method will result in the cache
flushing old values.
public int getCacheSize()
public void setSoftReferenceSize(int size)
size, then this method will result in the cache
flushing values.
public int getSoftReferenceSize()
-1.
public void initialize(org.apache.openjpa.datacache.DataCacheManager mgr)
initialize in interface org.apache.openjpa.datacache.DataCacheinitialize in class org.apache.openjpa.datacache.AbstractDataCachepublic void writeLock()
writeLock in interface org.apache.openjpa.datacache.DataCachepublic void writeUnlock()
writeUnlock in interface org.apache.openjpa.datacache.DataCacheprotected org.apache.openjpa.datacache.DataCachePCData getInternal(Object key)
getInternal in class org.apache.openjpa.datacache.AbstractDataCache
protected org.apache.openjpa.datacache.DataCachePCData putInternal(Object key,
org.apache.openjpa.datacache.DataCachePCData pc)
putInternal in class org.apache.openjpa.datacache.AbstractDataCacheprotected org.apache.openjpa.datacache.DataCachePCData removeInternal(Object key)
removeInternal in class org.apache.openjpa.datacache.AbstractDataCache
protected void removeAllInternal(Class cls,
boolean subs)
removeAllInternal in class org.apache.openjpa.datacache.AbstractDataCacheprotected void clearInternal()
clearInternal in class org.apache.openjpa.datacache.AbstractDataCacheprotected boolean pinInternal(Object key)
pinInternal in class org.apache.openjpa.datacache.AbstractDataCacheprotected boolean unpinInternal(Object key)
unpinInternal in class org.apache.openjpa.datacache.AbstractDataCache
|
Kodo 4.1.0 generated on October 9 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||