use of org.infinispan.filter.ParamKeyValueFilterConverterFactory in project infinispan by infinispan.
the class DefaultIterationManager method buildFilter.
private KeyValuePair<KeyValueFilterConverter, Boolean> buildFilter(KeyValueFilterConverterFactory factory, byte[][] params, Function<Object, Object> unmarshallParam) {
if (factory instanceof ParamKeyValueFilterConverterFactory) {
ParamKeyValueFilterConverterFactory paramFactory = (ParamKeyValueFilterConverterFactory) factory;
Object[] unmarshallParams;
if (paramFactory.binaryParam()) {
unmarshallParams = params;
} else {
unmarshallParams = Arrays.stream(params).map(unmarshallParam).toArray();
}
return new KeyValuePair<>(paramFactory.getFilterConverter(unmarshallParams), paramFactory.binaryParam());
} else {
return new KeyValuePair<>(factory.getFilterConverter(), false);
}
}
Aggregations