Class RemoveFunction<K,V>

java.lang.Object
org.infinispan.multimap.impl.function.multimap.RemoveFunction<K,V>
All Implemented Interfaces:
Serializable, Function<org.infinispan.functional.EntryView.ReadWriteEntryView<K,Bucket<V>>,Boolean>, BaseFunction<K,V,Boolean>, org.infinispan.util.function.SerializableFunction<org.infinispan.functional.EntryView.ReadWriteEntryView<K,Bucket<V>>,Boolean>

public final class RemoveFunction<K,V> extends Object implements BaseFunction<K,V,Boolean>
Serializable function used by EmbeddedMultimapCache.remove(Object) and EmbeddedMultimapCache.remove(Object, Object) to remove a key or a key/value pair from the Multimap Cache, if such exists.

apply(EntryView.ReadWriteEntryView) will return Boolean.TRUE when the operation removed a key or a key/value pair and will return Boolean.FALSE if the key or key/value pair does not exist

Since:
9.2
Author:
Katia Aresti - karesti@redhat.com
See Also:
  • Field Details

    • EXTERNALIZER

      public static final org.infinispan.commons.marshall.AdvancedExternalizer<RemoveFunction> EXTERNALIZER
  • Constructor Details

    • RemoveFunction

      public RemoveFunction()
      Call this constructor to create a function that removed a key
    • RemoveFunction

      public RemoveFunction(V value, boolean supportsDuplicates)
      Call this constructor to create a function that removed a key/value pair
      Parameters:
      value - value to be removed
  • Method Details

    • apply

      public Boolean apply(org.infinispan.functional.EntryView.ReadWriteEntryView<K,Bucket<V>> entryView)
      Specified by:
      apply in interface Function<K,V>