Interface CacheEntryProcessor.Entry<K,V>

Type Parameters:
K - the type of the key
V - the type of the value
All Known Subinterfaces:
ReadOnlyCacheEntryProcessor.ReadOnlyEntry<K,V>
All Known Implementing Classes:
MutableEntry, ReadOnlyEntry
Enclosing interface:
CacheEntryProcessor<K,V,R>

public static interface CacheEntryProcessor.Entry<K,V>
Represents a mutable entry in the map during processing. Modifications through this interface are atomic with respect to the underlying map entry.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if this entry exists in the map.
    key()
    Get the key of this entry.
    void
    Remove this entry from the map.
    void
    setValue(@Nullable V value)
    Set the value of this entry.
    @Nullable V
    Get the current value of this entry.
  • Method Details

    • key

      K key()
      Get the key of this entry.
      Returns:
      the key (never null)
    • value

      @Nullable V value()
      Get the current value of this entry.
      Returns:
      the value, or null if the entry does not exist
    • setValue

      void setValue(@Nullable V value)
      Set the value of this entry. This marks the entry for update within the processor execution.
      Parameters:
      value - the new value
    • remove

      void remove()
      Remove this entry from the map. After calling this, value() will return null.
    • exists

      boolean exists()
      Check if this entry exists in the map.
      Returns:
      true if the entry exists (value is not null or has been set)