|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
wt.util.Cache
wt.cache.DirtyCache
putLater
and removeLater
maintain thread-local
caches of modifications until the current transaction is completed.
addListener
and removeListener
allow
DirtyCacheListener
s to receive notifications of
puts and removes.
Nested Class Summary | |
static interface |
DirtyCache.DirtyCacheListener
Deprecated. Notified by putLater, putAllLater, remoteLater, and removeAllLater when changes to mappings are commited to the shared cache. |
static class |
DirtyCache.DirtyCacheListenerAdapter
Deprecated. Convenience base class for listener implementations. |
(package private) static class |
DirtyCache.DirtyMapListenerAdapter
Deprecated. |
Nested classes inherited from class wt.util.Cache |
Cache.CacheEntry |
Nested classes inherited from class java.util.AbstractMap |
|
Nested classes inherited from class java.util.Map |
Map.Entry |
Field Summary | |
private DirtyMap |
dirtyMap
Deprecated. |
Fields inherited from class wt.util.Cache |
agedOut, cacheSize, count, hashCodes, hits, keys, misses, modCount, tableSize, values |
Constructor Summary | |
DirtyCache(int size)
Deprecated. Constructs a cache with a private context key |
|
DirtyCache(int size,
Object context_key)
Deprecated. |
Method Summary | |
void |
addListener(DirtyCache.DirtyCacheListener listener)
Deprecated. |
Object |
getDirty(Object key)
Deprecated. Check thread-local cache. |
void |
putAllLater(Map mappings,
Object placeholder)
Deprecated. Puts all the mappings in the given map into the cache, following the same semantics as putLater(Object,Object,Object). |
void |
putLater(Object key,
Object value,
Object placeholder)
Deprecated. Keeps change in thread-local cache until the current transaction commits. |
void |
removeAll(Collection keys)
Deprecated. Convenience method that removes all the mappings for the keys in the given collection |
void |
removeAllLater(Collection keys)
Deprecated. Removes all the keys in the given set, following the semantics of removeLater(Object) |
void |
removeLater(Object key)
Deprecated. Overridden to keep change in thread-local cache until the current transaction commits |
void |
removeListener(DirtyCache.DirtyCacheListener listener)
Deprecated. |
Methods inherited from class wt.util.Cache |
clear, containsKey, containsValue, createEntry, entries, entrySet, find, get, getAndRemove, getAndReplace, getKeys, keySet, link, overflow, print, put, remove, size, toString, touch |
Methods inherited from class java.util.AbstractMap |
clone, equals, hashCode, isEmpty, putAll, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private DirtyMap dirtyMap
Constructor Detail |
public DirtyCache(int size)
public DirtyCache(int size, Object context_key)
Method Detail |
public Object getDirty(Object key)
public void putLater(Object key, Object value, Object placeholder) throws WTException
placeholder
is non-null, then only modifies the cache if
the key still maps to the local placeholder. This allows for the detection
of concurrent modification of the key by another thread.
Warning: This method must be called from within an active transaction
WTException
public void putAllLater(Map mappings, Object placeholder) throws WTException
mappings
- The mappings that should be added to the cacheplaceholder
- The placeholder to use
WTException
public void removeAll(Collection keys)
keys
- The keys to remove mappings forpublic void removeLater(Object key) throws WTException
Warning: This method must be called from within an active transaction
WTException
public void removeAllLater(Collection keys) throws WTException
WTException
public void addListener(DirtyCache.DirtyCacheListener listener)
public void removeListener(DirtyCache.DirtyCacheListener listener)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |