org.axonframework.cache
Class Cache.EntryListenerAdapter

java.lang.Object
  extended by org.axonframework.cache.Cache.EntryListenerAdapter
All Implemented Interfaces:
Cache.EntryListener
Enclosing interface:
Cache

public static class Cache.EntryListenerAdapter
extends Object
implements Cache.EntryListener

Adapter implementation for the EntryListener, allowing for overriding only specific callback methods.


Constructor Summary
Cache.EntryListenerAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache.EntryListenerAdapter

public Cache.EntryListenerAdapter()
Method Detail

onEntryExpired

public void onEntryExpired(Object key)
Description copied from interface: Cache.EntryListener
Invoked when an entry has expired.

Specified by:
onEntryExpired in interface Cache.EntryListener
Parameters:
key - The key of the entry that expired

onEntryRemoved

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

Specified by:
onEntryRemoved in interface Cache.EntryListener
Parameters:
key - The key of the entry that was removed

onEntryUpdated

public void onEntryUpdated(Object key,
                           Object value)
Description copied from interface: Cache.EntryListener
Invoked when an item has been updated.

Specified by:
onEntryUpdated in interface Cache.EntryListener
Parameters:
key - The key of the entry that was updated
value - The new value of the entry

onEntryCreated

public void onEntryCreated(Object key,
                           Object value)
Description copied from interface: Cache.EntryListener
Invoked when a new item has been added to the cache

Specified by:
onEntryCreated in interface Cache.EntryListener
Parameters:
key - The key of the entry that was added
value - The value of the entry

onEntryRead

public void onEntryRead(Object key,
                        Object value)
Description copied from interface: Cache.EntryListener
Invoked when an item was retrieved from the Cache

Specified by:
onEntryRead in interface Cache.EntryListener
Parameters:
key - The key of the entry that was read
value - The value of the entry read

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: Cache.EntryListener
Clone operation used by some Cache implementations. An implementation must implement Cloneable to indicate it supports cloning.

Specified by:
clone in interface Cache.EntryListener
Overrides:
clone in class Object
Returns:
a copy of this instance
Throws:
CloneNotSupportedException - if cloning is not supported
See Also:
Cloneable


Copyright © 2010-2016. All Rights Reserved.