Functions -
streams
avg | Returns a |
buildStreamEvent | Creates |
count | Returns a |
createAndOperatorProcessor | Creates and returns a |
createCompoundPatternProcessor | Creates and returns a |
createFilter | Creates a |
createFollowedByProcessor | Creates and returns a |
createNotOperatorProcessor | Creates and returns a |
createOperandProcessor | Creates and returns a |
createOrOperatorProcessor | Creates and returns a |
createOrderBy | Creates an |
createOutputProcess | Creates and return a |
createResetStreamEvent | Creates a RESET event from a given event. |
createSelect | Creates and returns a select clause. |
createStateMachine | Creates and returns a |
createStreamJoinProcessor | Creates a |
createTableJoinProcessor | Creates a |
delay | The |
distinctCount | Returns a |
externalTime | The |
externalTimeBatch | The |
getStreamEvent | Get the stream event from any? field. This function can only be used only if we are sure that the |
hopping | The |
initPersistence | Function to initialize and start snapshotting. |
length | The |
lengthBatch | The |
max | Returns a |
maxForever | Returns a |
min | Returns a |
minForever | Returns a |
registerSnapshotable | Function to register Snapshotables. |
removeState | Function to clear an existing state. |
restoreState | Function to restore state of a given object. |
sort | The |
stdDev | Returns a |
sum | Returns a |
time | The |
timeAccum | The |
timeBatch | The |
timeLength | The |
timeOrder | The |
toSnapshottableEvent | Convert a single |
toSnapshottableEvents | Converts a given array of streams:StreamEvent objects to an array of |
toStreamEvent | Convert a single |
toStreamEvents | Converts a given array of snapshotable events to an array of |
uniqueLength | The |
Returns a Average
aggregator object. The aggregator function name which is used in a streaming query should have the
same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
object which performs averaging.
Creates streams:StreamEvent
object array for a record t
received by the stream denoted by the name streamNme
.
Parameters
- t any
-
A record received by the stream
streamName
.
- streamName string
-
Name of the stream to which the record
t
is received.
-
Return Type
(StreamEvent[]) Returns an array of streams:StreamEvents|()
Returns a Count
aggregator object. The aggregator function name which is used in a streaming query should have the
same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
object which performs counting.
Creates and returns a AndOperatorProcessor
instance.
-
Return Type
(AndOperatorProcessor) A
AndOperatorProcessor
instance.
Creates and returns a CompoundPatternProcessor
instance.
Parameters
- withinTimeMillis int? - ()
-
time from initial state to current state
-
Return Type
(CompoundPatternProcessor) A
CompoundPatternProcessor
instance.
createFilter
( function(StreamEvent[]) returns (())
nextProcPointer, function(map) returns (boolean)
conditionFunc)
Creates a Filter
object and return it.
Parameters
- nextProcPointer
function(StreamEvent[]) returns (())
-
The function pointer to the
process
function of the next processor.
-
Return Type
(Filter) Returns a
Filter
object.
Creates and returns a FollowedByProcessor
instance.
-
Return Type
(FollowedByProcessor) A
FollowedByProcessor
instance.
Creates and returns a NotOperatorProcessor
instance.
Parameters
- forTimeMillis int?
-
for
time in milliseconds
-
Return Type
(NotOperatorProcessor) A
NotOperatorProcessor
instance.
createOperandProcessor
(string alias, function(map) returns (boolean)
onConditionFunc, int minOccurs, int maxOccurs)
Creates and returns a OperandProcessor
instance.
Parameters
- alias string
-
processor alias
- minOccurs int - 1
-
minimum occurrences of the event
- maxOccurs int - 1
-
maximum occurrences of the event
-
Return Type
(OperandProcessor) A
OperandProcessor
instance.
Creates and returns a OrOperatorProcessor
instance.
-
Return Type
(OrOperatorProcessor) A
OrOperatorProcessor
instance.
createOrderBy
( function(StreamEvent[]) returns (())
nextProcessorPointer, function(map) returns (anydata)
fields, string[] sortFieldMetadata)
Creates an OrderBy
object and return it.
Parameters
- nextProcessorPointer
function(StreamEvent[]) returns (())
-
A function pointer to the
process
function of the next processor.
- sortFieldMetadata string[]
-
sortTypes of the fields (
streams:ASCENDING
orstreams:DESCENDING
). First element is the sort type of the first element offields
and so on.
-
Return Type
(OrderBy) Returns a
OrderBy
object.
Creates and return a OutputProcess
object.
Parameters
-
Return Type
(OutputProcess) Returns a
OutputProcess
object.
Creates a RESET event from a given event.
Parameters
- event StreamEvent
-
The event from which the reset event is created.
-
Return Type
(StreamEvent) A stream event of type streams:RESET.
createSelect
( function(StreamEvent[]) returns (())
nextProcPointer, Aggregator[] aggregatorArr, function(StreamEvent) returns (anydata)
groupbyFuncArray, function(StreamEvent, Aggregator[]) returns (map)
selectFunc, string scopeName)
Creates and returns a select clause.
Parameters
- nextProcPointer
function(StreamEvent[]) returns (())
-
The function pointer to the
process
function of the next processor.
- aggregatorArr Aggregator[]
-
The array of aggregators used in the select clause. If the same aggregator is used twice, the
aggregatorArr
will contains that specific aggregator twice in the order they appear in the select clause.
- groupbyFuncArray
function(StreamEvent) returns (anydata)
-
The array of function pointer which contains the lambda function which returns the expressions in the group by clause.
- selectFunc
function(StreamEvent, Aggregator[]) returns (map)
-
The function pointer to a lambda function that creates the
data
field of the output stream event.
- scopeName string - $scope$name
-
A unique id to identify the forever block if there are multiple forever blocks.
-
Return Type
(Select) Returns a
Select
object.
createStateMachine
(CompoundPatternProcessor rootProcessor, function(StreamEvent[]) returns (())
nextProcPointer)
Creates and returns a StateMachine
object.
Parameters
- rootProcessor CompoundPatternProcessor
-
pointer to the root processor
- nextProcPointer
function(StreamEvent[]) returns (())
-
pointer for the next processor
-
Return Type
(StateMachine) A
StateMachine
object which performs pattern processing.
createStreamJoinProcessor
( function(StreamEvent[]) returns (())
nextProcessor, JoinType joinType, function(map, map) returns (boolean)
conditionFunc)
Creates a StreamJoinProcessor
and returns it.
Parameters
- nextProcessor
function(StreamEvent[]) returns (())
-
The
process
function of the next processor, which can be aSelect
processor,Aggregator
processor,Having
processor.. etc.
- joinType JoinType
-
Type of the join being performed ("JOIN"|"LEFTOUTERJOIN"|"RIGHTOUTERJOIN"|"FULLOUTERJOIN")
-
Return Type
(StreamJoinProcessor) Returns a
StreamJoinProcessor
object.
createTableJoinProcessor
( function(StreamEvent[]) returns (())
nextProcessor, JoinType joinType, function(StreamEvent) returns (map[])
tableQuery)
Creates a TableJoinProcessor
and return it.
Parameters
- nextProcessor
function(StreamEvent[]) returns (())
-
The function pointer to
process
function of the next processor, which can be aSelect
processor,Aggregator
processor,Having
processor.. etc
- joinType JoinType
-
The type of the join and it can be any value defined by
streams:JoinType
.
- tableQuery
function(StreamEvent) returns (map[])
-
The function pointer to a function which retrieves the records from the table and joins w ith each stream event.
-
Return Type
(TableJoinProcessor) Returns a
TableJoinProcessor
object.
delay
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The delay
function creates a DelayWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
Returns a DistinctCount
aggregator object. The aggregator function name which is used in a streaming query should
have the same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
object which represents DistinctCount.
externalTime
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The externalTime
function creates a ExternalTimeWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
externalTimeBatch
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The externalTimeBatch
function creates a ExternalTimeBatchWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
Get the stream event from any? field. This function can only be used only if we are sure that the anyEvent
is a
streams:StreamEvent.
Parameters
- anyEvent any?
-
The object from which, the stream event is extracted.
-
Return Type
(StreamEvent) Returns the extracted streams:StreamEvent object.
hopping
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The hopping
function creates a HoppingWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
length
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The length
function creates a LengthWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
lengthBatch
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The lengthBatch
function creates a LengthBatchWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
Returns a Max
aggregator object. The aggregator function name which is used in a streaming query should
have the same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
which representsMax
.
Returns a MaxForever
aggregator object. The aggregator function name which is used in a streaming query should
have the same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
which representsMaxForever
.
Returns a Min
aggregator object. The aggregator function name which is used in a streaming query should
have the same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
which representsMin
.
Returns a MinForever
aggregator object. The aggregator function name which is used in a streaming query should
have the same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
which representsMainForever
.
Function to register Snapshotables.
Function to clear an existing state.
Parameters
- key string
-
An unique
string
identifier for the snapshotable reference.
-
Return Type
(boolean) A
boolean
indicating whether the state for the given key removed successfully.
Function to restore state of a given object.
sort
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The sort
function creates a SortWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
Returns a StdDev
aggregator object. The aggregator function name which is used in a streaming query should
have the same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
which representsStdDev
.
Returns a Sum
aggregator object. The aggregator function name which is used in a streaming query should have the
same name as this function's name.
-
Return Type
(Aggregator) A
Aggregator
which perform addition/summation.
time
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The time
function creates a TimeWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
timeAccum
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The timeAccum
function creates a TimeAccumulatingWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
timeBatch
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The timeBatch
function creates a TimeBatchWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
timeLength
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The timeLength
function creates a TimeLengthWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
timeOrder
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The timeOrder
function creates a TimeOrderWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.
Convert a single streams:StreamEvent
object to streams:SnapshottableStreamEvent
object.
Parameters
- event StreamEvent
-
The
streams:StreamEvent
object to be converted to snapshotable event.
-
Return Type
(SnapshottableStreamEvent) The converted
streams:SnapshottableStreamEvent
object.
Converts a given array of streams:StreamEvent objects to an array of streams:SnapshottableStreamEvent
.
Parameters
- events StreamEvent[] | any[] | ()
-
The events to be coverted to snapshotable events.
-
Return Type
(SnapshottableStreamEvent[]) Returns the converted snapshotable events.
Convert a single streams:SnapshottableStreamEvent
object to streams:StreamEvent
object.
Parameters
- event SnapshottableStreamEvent
-
The
streams:SnapshottableStreamEvent
object to be converted to a stream event.
-
Return Type
(StreamEvent) The converted
streams:StreamEvent
object.
Converts a given array of snapshotable events to an array of streams:StreamEvent
objects.
Parameters
- events SnapshottableStreamEvent[] | any[] | ()
-
Snapshotable events to be converted to
streams:StreamEvents
.
-
Return Type
(StreamEvent[]) Returns the converted
streams:StreamEvents
objects array.
uniqueLength
(any[] windowParameters, function(StreamEvent[]) returns (())
nextProcessPointer)
The uniqueLength
function creates a UniqueLengthWindow
object and returns it.
Parameters
- windowParameters any[]
-
Arguments which should be passed with the window function in the streams query in the order they appear in the argument list.
- nextProcessPointer
function(StreamEvent[]) returns (())
- () -
The function pointer to the
process
function of the next processor.
-
Return Type
(Window) Returns the created window.