org.axonframework.cache
Interface Cache.EntryListener

All Known Implementing Classes:
Cache.EntryListenerAdapter
Enclosing interface:
Cache

public static interface Cache.EntryListener

Interface describing callback methods, which are invoked when changes are made in the underlying cache.


Method Summary
 Object clone()
          Clone operation used by some Cache implementations.
 void onEntryCreated(Object key, Object value)
          Invoked when a new item has been added to the cache
 void onEntryExpired(Object key)
          Invoked when an entry has expired.
 void onEntryRead(Object key, Object value)
          Invoked when an item was retrieved from the Cache
 void onEntryRemoved(Object key)
          Invoked when an item was removed from the cache, either following an expiry, or by explicitly calling Cache.remove(Object).
 void onEntryUpdated(Object key, Object value)
          Invoked when an item has been updated.
 

Method Detail

onEntryExpired

void onEntryExpired(Object key)
Invoked when an entry has expired.

Parameters:
key - The key of the entry that expired

onEntryRemoved

void onEntryRemoved(Object key)
Invoked when an item was removed from the cache, either following an expiry, or by explicitly calling Cache.remove(Object).

Parameters:
key - The key of the entry that was removed

onEntryUpdated

void onEntryUpdated(Object key,
                    Object value)
Invoked when an item has been updated.

Parameters:
key - The key of the entry that was updated
value - The new value of the entry

onEntryCreated

void onEntryCreated(Object key,
                    Object value)
Invoked when a new item has been added to the cache

Parameters:
key - The key of the entry that was added
value - The value of the entry

onEntryRead

void onEntryRead(Object key,
                 Object value)
Invoked when an item was retrieved from the Cache

Parameters:
key - The key of the entry that was read
value - The value of the entry read

clone

Object clone()
             throws CloneNotSupportedException
Clone operation used by some Cache implementations. An implementation must implement Cloneable to indicate it supports cloning.

Returns:
a copy of this instance
Throws:
CloneNotSupportedException - if cloning is not supported
See Also:
Cloneable


Copyright © 2010-2016. All Rights Reserved.