Top
Interstage Big DataComplex Event Processing Server V1.1.0 Developer's Reference
FUJITSU Software

1.4.10 Pattern Guard

The pattern guard controls a subexpression by specifying a condition in a WHERE clause or a WHILE clause.

The pattern guards available for specification in the WHERE clause are TIMER:WITHIN and TIMER:WITHINMAX. A WHERE clause that specifies a pattern guard is different from a WHERE clause that specifies event filtering in complex event processing language.

Syntax:

timer:within( timeExpression )

If the pattern expression does not become TRUE within the specified time, evaluation of the expression ends. In the timeExpression, specify either a time representation or an expression providing the number of seconds.

Syntax:

timer:withinmax( timeExpression, maximumNumberExpression )

In addition to the TIMER:WITHIN processing, the number of matches are counted. Evaluation of the expression ends when either the time specified in the timeExpression has elapsed or when the number specified in the maximumNumberExpression is reached.


The pattern guard specified by the WHILE clause evaluates the guardExpression for each pattern detected, and evaluation of the pattern expression ends at the point when it is evaluated as being FALSE.

Syntax:

while ( guardExpression )

Any expression that returns Boolean (TRUE or FALSE) can be written in a guardExpression.