Package com.fluxtion.ext.streaming.api
Interface FilterWrapper<T>
- Type Parameters:
T
-
- All Known Implementing Classes:
AbstractFilterWrapper
,BooleanEitherFilter
,BooleanFilter
,BooleanMatchFilter
,DefaultNumberWrapper
,DefaultNumberWrapper.DefaultDoubleWrapper
,DefaultNumberWrapper.DefaultIntWrapper
,DefaultNumberWrapper.DefaultLongWrapper
,TestFilter
public interface FilterWrapper<T> extends Wrapper<T>, Test
A wrapper around a node that is created as the result of a filtering
operation.
- Author:
- Greg Higgins [email protected]
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fluxtion.ext.streaming.api.Stateful
Stateful.StatefulNumber<S>
-
Field Summary
-
Method Summary
Modifier and Type Method Description default Wrapper<T>
elseStream()
provides an else branch to a filter node in this stream.default FilterWrapper<T>
forEach(com.fluxtion.api.partition.LambdaReflection.SerializableConsumer<T> consumer)
Registers aConsumer
to operate on the current node when an event wave is passing through this node.default FilterWrapper<T>
forEach(com.fluxtion.api.partition.LambdaReflection.SerializableConsumer<T> consumer, java.lang.String consumerId)
default FilterWrapper<T>
id(java.lang.String id)
Set the node id for this node within the generated SEP.default FilterWrapper<T>
notifyOnChange(boolean notifyOnChange)
Controls the notification policy of event notification to child nodes for this stream node.default <R, S extends R>
FilterWrapper<T>push(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<T,S> supplier, com.fluxtion.api.partition.LambdaReflection.SerializableConsumer<R> mapper)
pushes a data item from the current node in the stream to any node.The target node will become part of the same execution graph as the source.default FilterWrapper<T>
validOnStart(boolean alwaysReset)
Set this property to signal the wrapper has a valid value and child nodes do not have to wait for a trigger notification before using the data from this instance.Methods inherited from interface com.fluxtion.ext.streaming.api.Stateful
combine, deduct, setBucketCount
Methods inherited from interface com.fluxtion.ext.streaming.api.Wrapper
arg, arg, collect, console, defaultVal, event, eventClass, filter, filter, get, group, group, isValidOnStart, map, map, map, map, map, map, map, map, map, map, notiferMerge, notifierOverride, publishAndReset, push, reset, resetAndPublish, resetNoPublish
-
Method Details
-
elseStream
provides an else branch to a filter node in this stream.- Returns:
- A wrapper on the else branch of a filtering operation
-
notifyOnChange
Description copied from interface:Wrapper
Controls the notification policy of event notification to child nodes for this stream node. The default policy is to invoke child nodes when the return of the parent event method is true. NotifyOnChange notifies the child only when the parent node return of the previous cycle is false and this one is true.This can be useful if a single notification of a breach is required and subsequent continued breaches are swallowed, for example this can prevent logging spamming when combined with filters.
- Specified by:
notifyOnChange
in interfaceWrapper<T>
- Parameters:
notifyOnChange
- false = notify always. true = notify on change only- Returns:
- The current node
-
push
default <R, S extends R> FilterWrapper<T> push(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<T,S> supplier, com.fluxtion.api.partition.LambdaReflection.SerializableConsumer<R> mapper)Description copied from interface:Wrapper
pushes a data item from the current node in the stream to any node.The target node will become part of the same execution graph as the source.The returned node is the current node in the stream.
-
forEach
default FilterWrapper<T> forEach(com.fluxtion.api.partition.LambdaReflection.SerializableConsumer<T> consumer)Description copied from interface:Wrapper
Registers aConsumer
to operate on the current node when an event wave is passing through this node. The consumer can perform any operation on the node including mutations. This node, possibly mutated, is passed as a reference to child nodes. No new nodes are created in the stream as a side-effect of this processing. -
forEach
default FilterWrapper<T> forEach(com.fluxtion.api.partition.LambdaReflection.SerializableConsumer<T> consumer, java.lang.String consumerId) -
validOnStart
Description copied from interface:Wrapper
Set this property to signal the wrapper has a valid value and child nodes do not have to wait for a trigger notification before using the data from this instance.- Specified by:
validOnStart
in interfaceWrapper<T>
- Returns:
-
id
Description copied from interface:Wrapper
Set the node id for this node within the generated SEP. This is the variable name of the node in a Java SEP. The id must be unique for the SEP.
-