public final class CacheFilters extends Object
KeyValueFilter
, Converter
& KeyValueFilterConverter
to appropriate distributed stream
instances.Modifier and Type | Class and Description |
---|---|
static class |
CacheFilters.CacheFiltersExternalizer |
Modifier and Type | Method and Description |
---|---|
static <K,V,C> Stream<CacheEntry<K,C>> |
filterAndConvert(Stream<CacheEntry<K,V>> stream,
KeyValueFilterConverter<? super K,? super V,C> filterConverter)
Adds needed intermediate operations to the provided stream, returning a possibly new stream as a result of the
operations.
|
static <K,V,C> Function<CacheEntry<K,V>,CacheEntry<K,C>> |
function(Converter<? super K,? super V,C> converter)
Creates a new
Function using the provided converter as a basis for the operation. |
static <K,V> Predicate<CacheEntry<K,V>> |
predicate(KeyValueFilter<? super K,? super V> filter)
Creates a new
Predicate using the provided key value filter as a basis for the operation. |
public static <K,V> Predicate<CacheEntry<K,V>> predicate(KeyValueFilter<? super K,? super V> filter)
Predicate
using the provided key value filter as a basis for the operation. This is useful
for when using Stream.filter(Predicate)
method on distributed streams. The key,
value and metadata are all used to determine if the predicate returns true or not.K
- key typeV
- value typefilter
- the filter to utilizepublic static <K,V,C> Function<CacheEntry<K,V>,CacheEntry<K,C>> function(Converter<? super K,? super V,C> converter)
Function
using the provided converter as a basis for the operation. This is useful
for when using Stream.map(Function)
method on distributed streams. The key,
value and metadata are all used to determine the converted value.K
- key typeV
- value typeC
- convertered value typeconverter
- the converter to utilizepublic static <K,V,C> Stream<CacheEntry<K,C>> filterAndConvert(Stream<CacheEntry<K,V>> stream, KeyValueFilterConverter<? super K,? super V,C> filterConverter)
KeyValueFilterConverter
was designed to do. The key,
value and metadata are all used to determine whether the value is returned and the converted value.K
- V
- C
- stream
- stream to perform the operations onfilterConverter
- converter to applyCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.