Interface CachedReferenceEvent<V>


@PublicApi public interface CachedReferenceEvent<V>
A resettable reference event.

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

  • Firstly, some events inherently do not have value. For instance resetting does not have a value as the corresponding element was just removed from the cached reference
  • Secondly, in some implementations the information for the value and/or old value is not available at all.
  • Thirdly, the listener can be added as a valueless listener
Since:
2.4
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns cached reference value
  • Method Details

    • getValue

      @Nullable V getValue()
      Returns cached reference value
      Returns:
      the value. For details why is this method marked as Nullable please refer to the class level documentation