Class ProjectedStream
java.lang.Object
com.espertech.esper.common.client.soda.Stream
com.espertech.esper.common.client.soda.ProjectedStream
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FilterStream
,PatternStream
Abstract base class for streams that can be projected via views providing data window, uniqueness or other projections
or deriving further information from streams.
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionCtor.protected
ProjectedStream
(List<View> views, String optStreamName) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionAdd a view to the stream.addView
(String name, Expression... parameters) Adds a parameterized view to the stream.Adds an un-parameterized view to the stream.addView
(String namespace, String name, Expression... parameters) Adds a parameterized view to the stream.addView
(String namespace, String name, List<Expression> parameters) Adds a parameterized view to the stream.getViews()
Returns the list of views added to the stream.boolean
Returns true if multiple data window shall be treated as an intersection.boolean
Returns true if multiple data window shall be treated as a union.boolean
Returns true if the stream as unidirectional, for use in unidirectional joins.void
setRetainIntersection
(boolean retainIntersection) Set to true to have multiple data window be treated as a intersection.void
setRetainUnion
(boolean retainUnion) Set to true to have multiple data window be treated as a union.void
setUnidirectional
(boolean isUnidirectional) Set to true to indicate that a stream is unidirectional, for use in unidirectional joins.void
Sets the list of views onto the stream.abstract void
toEPLProjectedStream
(StringWriter writer, EPStatementFormatter formatter) Represent as textual.abstract void
toEPLProjectedStreamType
(StringWriter writer) Represent type as textual non complete.void
toEPLStream
(StringWriter writer, EPStatementFormatter formatter) Renders the clause in textual representation.void
toEPLStreamOptions
(StringWriter writer) Renders the stream in textual representation any stream options, if present.void
toEPLStreamType
(StringWriter writer) Renders the stream type under a non-complete textual representation for tool useprotected static void
toEPLViews
(StringWriter writer, List<View> views) Renders the views onto the projected stream.unidirectional
(boolean isUnidirectional) Set to unidirectional.Methods inherited from class com.espertech.esper.common.client.soda.Stream
getStreamName, setStreamName, toEPL
-
Constructor Details
-
ProjectedStream
public ProjectedStream()Ctor. -
ProjectedStream
Ctor.- Parameters:
views
- is a list of views upon the streamoptStreamName
- is the stream as-name, or null if unnamed
-
-
Method Details
-
toEPLProjectedStream
Represent as textual.- Parameters:
writer
- to output toformatter
- for newline-whitespace formatting
-
toEPLProjectedStreamType
Represent type as textual non complete.- Parameters:
writer
- to output to
-
addView
Adds an un-parameterized view to the stream.- Parameters:
namespace
- is the view namespace, for example "win" for most data windowsname
- is the view name, for example "length" for a length window- Returns:
- stream
-
addView
Adds a parameterized view to the stream.- Parameters:
namespace
- is the view namespace, for example "win" for most data windowsname
- is the view name, for example "length" for a length windowparameters
- is a list of view parameters- Returns:
- stream
-
addView
Adds a parameterized view to the stream.- Parameters:
namespace
- is the view namespace, for example "win" for most data windowsname
- is the view name, for example "length" for a length windowparameters
- is a list of view parameters- Returns:
- stream
-
addView
Adds a parameterized view to the stream.- Parameters:
name
- is the view name, for example "length" for a length windowparameters
- is a list of view parameters- Returns:
- stream
-
addView
Add a view to the stream.- Parameters:
view
- to add- Returns:
- stream
-
getViews
Returns the list of views added to the stream.- Returns:
- list of views
-
setViews
Sets the list of views onto the stream.- Parameters:
views
- list of views
-
toEPLStream
Renders the clause in textual representation.- Specified by:
toEPLStream
in classStream
- Parameters:
writer
- to output toformatter
- for newline-whitespace formatting
-
toEPLStreamType
Description copied from class:Stream
Renders the stream type under a non-complete textual representation for tool use- Specified by:
toEPLStreamType
in classStream
- Parameters:
writer
- to output to
-
isUnidirectional
public boolean isUnidirectional()Returns true if the stream as unidirectional, for use in unidirectional joins.- Returns:
- true for unidirectional stream, applicable only for joins
-
setUnidirectional
public void setUnidirectional(boolean isUnidirectional) Set to true to indicate that a stream is unidirectional, for use in unidirectional joins.- Parameters:
isUnidirectional
- true for unidirectional stream, applicable only for joins
-
unidirectional
Set to unidirectional.- Parameters:
isUnidirectional
- try if unidirectional- Returns:
- stream
-
isRetainUnion
public boolean isRetainUnion()Returns true if multiple data window shall be treated as a union.- Returns:
- retain union
-
setRetainUnion
public void setRetainUnion(boolean retainUnion) Set to true to have multiple data window be treated as a union.- Parameters:
retainUnion
- indicator to union
-
isRetainIntersection
public boolean isRetainIntersection()Returns true if multiple data window shall be treated as an intersection.- Returns:
- retain intersection
-
setRetainIntersection
public void setRetainIntersection(boolean retainIntersection) Set to true to have multiple data window be treated as a intersection.- Parameters:
retainIntersection
- indicator to intersection
-
toEPLViews
Renders the views onto the projected stream.- Parameters:
writer
- to render toviews
- to render
-
toEPLStreamOptions
Description copied from class:Stream
Renders the stream in textual representation any stream options, if present.- Specified by:
toEPLStreamOptions
in classStream
- Parameters:
writer
- to output to
-