T
- Type of the eventspublic class PatternStream<T> extends Object
NFA
. In order to process the detected sequences, the user
has to specify a PatternSelectFunction
or a PatternFlatSelectFunction
.
Additionally it allows to handle partially matched event patterns which have timed out. For this
the user has to specify a PatternTimeoutFunction
or a PatternFlatTimeoutFunction
.Modifier and Type | Method and Description |
---|---|
<R> SingleOutputStreamOperator<R> |
flatSelect(PatternFlatSelectFunction<T,R> patternFlatSelectFunction)
Applies a flat select function to the detected pattern sequence.
|
<R> SingleOutputStreamOperator<R> |
flatSelect(PatternFlatSelectFunction<T,R> patternFlatSelectFunction,
TypeInformation<R> outTypeInfo)
Applies a flat select function to the detected pattern sequence.
|
<L,R> SingleOutputStreamOperator<Either<L,R>> |
flatSelect(PatternFlatTimeoutFunction<T,L> patternFlatTimeoutFunction,
PatternFlatSelectFunction<T,R> patternFlatSelectFunction)
Applies a flat select function to the detected pattern sequence.
|
DataStream<T> |
getInputStream() |
Pattern<T,?> |
getPattern() |
<R> SingleOutputStreamOperator<R> |
select(PatternSelectFunction<T,R> patternSelectFunction)
Applies a select function to the detected pattern sequence.
|
<R> SingleOutputStreamOperator<R> |
select(PatternSelectFunction<T,R> patternSelectFunction,
TypeInformation<R> outTypeInfo)
Applies a select function to the detected pattern sequence.
|
<L,R> SingleOutputStreamOperator<Either<L,R>> |
select(PatternTimeoutFunction<T,L> patternTimeoutFunction,
PatternSelectFunction<T,R> patternSelectFunction)
Applies a select function to the detected pattern sequence.
|
public DataStream<T> getInputStream()
public <R> SingleOutputStreamOperator<R> select(PatternSelectFunction<T,R> patternSelectFunction)
PatternSelectFunction
is called. The pattern select function can produce
exactly one resulting element.R
- Type of the resulting elementspatternSelectFunction
- The pattern select function which is called for each detected
pattern sequence.DataStream
which contains the resulting elements from the pattern select
function.public <R> SingleOutputStreamOperator<R> select(PatternSelectFunction<T,R> patternSelectFunction, TypeInformation<R> outTypeInfo)
PatternSelectFunction
is called. The pattern select function can produce
exactly one resulting element.R
- Type of the resulting elementspatternSelectFunction
- The pattern select function which is called for each detected
pattern sequence.outTypeInfo
- Explicit specification of output type.DataStream
which contains the resulting elements from the pattern select
function.public <L,R> SingleOutputStreamOperator<Either<L,R>> select(PatternTimeoutFunction<T,L> patternTimeoutFunction, PatternSelectFunction<T,R> patternSelectFunction)
PatternSelectFunction
is called. The pattern select function can produce
exactly one resulting element.
Applies a timeout function to a partial pattern sequence which has timed out. For each
partial pattern sequence the provided PatternTimeoutFunction
is called. The pattern
timeout function can produce exactly one resulting element.L
- Type of the resulting timeout elementsR
- Type of the resulting elementspatternTimeoutFunction
- The pattern timeout function which is called for each partial
pattern sequence which has timed out.patternSelectFunction
- The pattern select function which is called for each detected
pattern sequence.DataStream
which contains the resulting elements or the resulting timeout
elements wrapped in an Either
type.public <R> SingleOutputStreamOperator<R> flatSelect(PatternFlatSelectFunction<T,R> patternFlatSelectFunction)
PatternFlatSelectFunction
is called. The pattern flat select function
can produce an arbitrary number of resulting elements.R
- Type of the resulting elementspatternFlatSelectFunction
- The pattern flat select function which is called for each
detected pattern sequence.DataStream
which contains the resulting elements from the pattern flat select
function.public <R> SingleOutputStreamOperator<R> flatSelect(PatternFlatSelectFunction<T,R> patternFlatSelectFunction, TypeInformation<R> outTypeInfo)
PatternFlatSelectFunction
is called. The pattern flat select function
can produce an arbitrary number of resulting elements.R
- Type of the resulting elementspatternFlatSelectFunction
- The pattern flat select function which is called for each
detected pattern sequence.outTypeInfo
- Explicit specification of output type.DataStream
which contains the resulting elements from the pattern flat select
function.public <L,R> SingleOutputStreamOperator<Either<L,R>> flatSelect(PatternFlatTimeoutFunction<T,L> patternFlatTimeoutFunction, PatternFlatSelectFunction<T,R> patternFlatSelectFunction)
PatternFlatSelectFunction
is called. The pattern flat select function
can produce an arbitrary number of resulting elements.
Applies a timeout function to a partial pattern sequence which has timed out. For each
partial pattern sequence the provided PatternFlatTimeoutFunction
is called. The
pattern timeout function can produce an arbitrary number of resulting elements.L
- Type of the resulting timeout eventsR
- Type of the resulting eventspatternFlatTimeoutFunction
- The pattern flat timeout function which is called for each
partial pattern sequence which has timed out.patternFlatSelectFunction
- The pattern flat select function which is called for each
detected pattern sequence.DataStream
which contains the resulting events from the pattern flat select
function or the resulting timeout events from the pattern flat timeout function wrapped in an
Either
type.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.