|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.cache.util.AbstractCache<T>
T - public abstract class AbstractCache<T>
Base class for Cache implementations. It provides events DisposableCacheValue management.
| Field Summary | |
|---|---|
protected javax.swing.event.EventListenerList |
cacheEntryListeners
The list of listener to called when events appends on a cache entry. |
protected CacheConfiguration |
configuration
The configuration used to create the cache. |
| Constructor Summary | |
|---|---|
AbstractCache()
|
|
| Method Summary | |
|---|---|
void |
addCacheEntryListener(CacheEntryListener<T> listener)
Add the provided listener to the cache to catch events on entries like add, remove etc. |
void |
dispose()
Release all the resources this cache use. |
protected void |
disposeCacheValue(T value)
Dispose the value being removed from the cache. |
void |
removeCacheEntryListener(CacheEntryListener<T> listener)
Remove the provided listener from the list of listeners. |
protected void |
sendEntryAddedEvent(CacheEntryEvent<T> event)
Helper method to send event when a new cache entry is inserted. |
protected void |
sendEntryModifiedEvent(CacheEntryEvent<T> event)
Helper method to send event when a cache entry is modified. |
protected void |
sendEntryRemovedEvent(CacheEntryEvent<T> event)
Helper method to send event when an existing cache entry is removed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xwiki.cache.Cache |
|---|
get, remove, removeAll, set |
| Field Detail |
|---|
protected CacheConfiguration configuration
protected final javax.swing.event.EventListenerList cacheEntryListeners
| Constructor Detail |
|---|
public AbstractCache()
| Method Detail |
|---|
public void dispose()
dispose in interface Cache<T>Cache.dispose()public void addCacheEntryListener(CacheEntryListener<T> listener)
addCacheEntryListener in interface Cache<T>listener - the implemented listener.Cache.addCacheEntryListener(org.xwiki.cache.event.CacheEntryListener)public void removeCacheEntryListener(CacheEntryListener<T> listener)
removeCacheEntryListener in interface Cache<T>listener - the implemented listener.Cache.removeCacheEntryListener(org.xwiki.cache.event.CacheEntryListener)protected void sendEntryAddedEvent(CacheEntryEvent<T> event)
event - the event to send.protected void sendEntryRemovedEvent(CacheEntryEvent<T> event)
event - the event to send.protected void sendEntryModifiedEvent(CacheEntryEvent<T> event)
event - the event to send.protected void disposeCacheValue(T value)
value - the value to dispose
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||