com.atlassian.cache.impl
Interface CacheEntryListenerSupport<K,V>

All Known Implementing Classes:
DefaultCacheEntryListenerSupport, LazyCacheEntryListenerSupport, ValueCacheEntryListenerSupport

public interface CacheEntryListenerSupport<K,V>

This interface is designed to support Cache implementations in working with CacheEntryListeners.

The main usage pattern for which this is designed is to use delegation for add/remove (therefore the listeners are managed by the this interface) and then use notify* methods to create and deliver the actual events.


Field Summary
static CacheEntryListenerSupport EMPTY
           
 
Method Summary
 void add(CacheEntryListener<K,V> listener, boolean includeValues)
           
 void notifyAdd(K key, V value)
           
 void notifyEvict(K key, V oldValue)
           
 void notifyRemove(K key, V oldValue)
           
 void notifyUpdate(K key, V value, V oldValue)
           
 void remove(CacheEntryListener<K,V> listener)
           
 

Field Detail

EMPTY

static final CacheEntryListenerSupport EMPTY
Method Detail

add

void add(CacheEntryListener<K,V> listener,
         boolean includeValues)

remove

void remove(CacheEntryListener<K,V> listener)

notifyAdd

void notifyAdd(K key,
               V value)

notifyEvict

void notifyEvict(K key,
                 V oldValue)

notifyRemove

void notifyRemove(K key,
                  V oldValue)

notifyUpdate

void notifyUpdate(K key,
                  V value,
                  V oldValue)


Copyright © 2015 Atlassian. All rights reserved.