Interface KeyValueFilterConverter<K,V,C>

All Superinterfaces:
Converter<K,V,C>, KeyValueFilter<K,V>
All Known Implementing Classes:
AbstractKeyValueFilterConverter, CacheEventFilterConverterAsKeyValueFilterConverter, IterationFilter

public interface KeyValueFilterConverter<K,V,C> extends KeyValueFilter<K,V>, Converter<K,V,C>
This interface is an optimization that can be used when a filter and converter are most efficiently used as the same object composing the filtering and conversion in the same method invocation.
Since:
7.0
Author:
wburns
  • Method Summary

    Modifier and Type
    Method
    Description
    filterAndConvert(K key, V value, Metadata metadata)
    Will both filter the entry and if passed subsequently convert the value to a new value.

    Methods inherited from interface org.infinispan.filter.Converter

    convert

    Methods inherited from interface org.infinispan.filter.KeyValueFilter

    accept, format
  • Method Details

    • filterAndConvert

      C filterAndConvert(K key, V value, Metadata metadata)
      Will both filter the entry and if passed subsequently convert the value to a new value. A returned value of null will symbolize the value not passing the filter, so ensure your conversion will not return null if you want this entry to be returned.
      Parameters:
      key - The key of the entry to filter
      value - The value of the entry to filter and then convert
      metadata - The metadata attached to the entry
      Returns:
      The converted value or null if the filter didn't pass