com.atlassian.cache
Interface CacheEntryEvent<K,V>

All Known Implementing Classes:
DefaultCacheEntryEvent

@PublicApi
public interface CacheEntryEvent<K,V>

A cache event.

NOTE: Although Cache does not support null as a valid value we are using it in getValue and getOldValue as a way to represent missing value. We have the following reasons for this:

Since:
2.4

Method Summary
 K getKey()
          Returns the key the event was fired for
 V getOldValue()
          Returns the old value for this key
 V getValue()
          Returns the current value for this key
 

Method Detail

getKey

@Nonnull
K getKey()
Returns the key the event was fired for

Returns:
the key

getValue

@Nullable
V getValue()
Returns the current value for this key

Returns:
the value. For details why is this method marked as Nullable please refer to the class level documentation

getOldValue

@Nullable
V getOldValue()
Returns the old value for this key

Returns:
the old value. For details why is this method marked as Nullable please refer to the class level documentation


Copyright © 2015 Atlassian. All rights reserved.