|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.client.soda.Patterns
public class Patterns
Convenience factory for creating PatternExpr
instances, which represent pattern expression trees.
Provides quick-access method to create all possible pattern expressions and provides typical parameter lists to each.
Note that only the typical parameter lists are provided and pattern expressions can allow adding additional parameters.
Many expressions, for example logical AND and OR (conjunction and disjunction), allow adding an unlimited number of additional sub-expressions to a pattern expression. For those pattern expressions there are additional add methods.
Constructor Summary | |
---|---|
Patterns()
|
Method Summary | |
---|---|
static PatternAndExpr |
and()
Pattern-AND expression, allows adding sub-expressions that are connected by a logical AND. |
static PatternAndExpr |
and(PatternExpr first,
PatternExpr second,
PatternExpr... more)
Pattern-AND expression, allows adding sub-expressions that are connected by a logical AND. |
static PatternEveryExpr |
every(PatternExpr inner)
Pattern-every expression control the lifecycle of the pattern sub-expression. |
static PatternEveryExpr |
everyFilter(Filter filter)
Pattern every-operator and filter in combination, equivalent to the "every MyEvent(vol > 100)" syntax. |
static PatternEveryExpr |
everyFilter(Filter filter,
java.lang.String tagName)
Pattern every-operator and filter in combination, equivalent to the "every tag=MyEvent(vol > 100)" syntax. |
static PatternEveryExpr |
everyFilter(java.lang.String eventTypeName)
Pattern every-operator and filter in combination, equivalent to the "every MyEvent" syntax. |
static PatternEveryExpr |
everyFilter(java.lang.String eventTypeName,
java.lang.String tagName)
Pattern every-operator and filter in combination, equivalent to the "every tag=MyEvent" syntax. |
static PatternFilterExpr |
filter(Filter filter)
Filter expression for use in patterns, equivalent to the "MyEvent(vol > 100)" syntax. |
static PatternFilterExpr |
filter(Filter filter,
java.lang.String tagName)
Filter expression for use in patterns, equivalent to the "tag=MyEvent(vol > 100)" syntax. |
static PatternFilterExpr |
filter(java.lang.String eventTypeName)
Filter expression for use in patterns, equivalent to the simple "MyEvent" syntax. |
static PatternFilterExpr |
filter(java.lang.String eventTypeName,
java.lang.String tagName)
Filter expression for use in patterns, equivalent to the simple "tag=MyEvent" syntax. |
static PatternFollowedByExpr |
followedBy()
Pattern followed-by expression, allows adding sub-expressions that are connected by a followed-by. |
static PatternFollowedByExpr |
followedBy(PatternExpr first,
PatternExpr second,
PatternExpr... more)
Pattern followed-by expression, allows adding sub-expressions that are connected by a followed-by. |
static PatternGuardExpr |
guard(java.lang.String namespace,
java.lang.String name,
Expression[] parameters,
PatternExpr guarded)
Guard pattern expression guards a sub-expression, equivalent to the "every MyEvent where timer:within(1 sec)" syntax |
static PatternMatchUntilExpr |
matchUntil(Expression low,
Expression high,
PatternExpr match,
PatternExpr until)
Match-until-pattern expression matches a certain number of occurances until a second expression becomes true. |
static PatternNotExpr |
not(PatternExpr subexpression)
Not-keyword pattern expression flips the truth-value of the pattern sub-expression. |
static PatternNotExpr |
notFilter(Filter filter)
Pattern not-operator and filter in combination, equivalent to the "not MyEvent(vol > 100)" syntax. |
static PatternNotExpr |
notFilter(Filter filter,
java.lang.String tagName)
Pattern not-operator and filter in combination, equivalent to the "not tag=MyEvent(vol > 100)" syntax. |
static PatternNotExpr |
notFilter(java.lang.String eventTypeName)
Pattern not-operator and filter in combination, equivalent to the "not MyEvent" syntax. |
static PatternNotExpr |
notFilter(java.lang.String name,
java.lang.String tagName)
Pattern not-operator and filter in combination, equivalent to the "not tag=MyEvent" syntax. |
static PatternObserverExpr |
observer(java.lang.String namespace,
java.lang.String name,
Expression[] parameters)
Observer pattern expression, equivalent to the "every timer:interval(1 sec)" syntax |
static PatternOrExpr |
or()
Pattern-OR expression, allows adding sub-expressions that are connected by a logical OR. |
static PatternOrExpr |
or(PatternExpr first,
PatternExpr second,
PatternExpr... more)
Pattern-OR expression, allows adding sub-expressions that are connected by a logical OR. |
static PatternObserverExpr |
timerAt(java.lang.Integer minutes,
java.lang.Integer hours,
java.lang.Integer daysOfMonth,
java.lang.Integer month,
java.lang.Integer daysOfWeek,
java.lang.Integer seconds)
Timer-at observer |
static PatternObserverExpr |
timerInterval(double seconds)
Timer-interval observer expression. |
static PatternGuardExpr |
timerWithin(double seconds,
PatternExpr guarded)
Timer-within guard expression. |
static PatternGuardExpr |
timerWithinMax(double seconds,
int max,
PatternExpr guarded)
Timer-within-max guard expression. |
static PatternGuardExpr |
whileGuard(PatternExpr guarded,
Expression expression)
While-guard expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Patterns()
Method Detail |
---|
public static PatternEveryExpr every(PatternExpr inner)
inner
- sub-expression to the every-keyword
public static PatternAndExpr and()
public static PatternAndExpr and(PatternExpr first, PatternExpr second, PatternExpr... more)
first
- is the first pattern sub-expression to add to the ANDsecond
- is a second pattern sub-expression to add to the ANDmore
- is optional additional pattern sub-expression to add to the AND
public static PatternOrExpr or(PatternExpr first, PatternExpr second, PatternExpr... more)
first
- is the first pattern sub-expression to add to the ORsecond
- is a second pattern sub-expression to add to the ORmore
- is optional additional pattern sub-expression to add to the OR
public static PatternOrExpr or()
public static PatternFollowedByExpr followedBy(PatternExpr first, PatternExpr second, PatternExpr... more)
first
- is the first pattern sub-expression to add to the followed-bysecond
- is a second pattern sub-expression to add to the followed-bymore
- is optional additional pattern sub-expression to add to the followed-by
public static PatternFollowedByExpr followedBy()
public static PatternEveryExpr everyFilter(java.lang.String eventTypeName)
eventTypeName
- is the event type name to filter for
public static PatternEveryExpr everyFilter(java.lang.String eventTypeName, java.lang.String tagName)
eventTypeName
- is the event type name to filter fortagName
- is the tag name to assign to matching events
public static PatternEveryExpr everyFilter(Filter filter)
filter
- specifies the event type name and filter expression to filter for
public static PatternEveryExpr everyFilter(Filter filter, java.lang.String tagName)
filter
- specifies the event type name and filter expression to filter fortagName
- is the tag name to assign to matching events
public static PatternFilterExpr filter(java.lang.String eventTypeName)
eventTypeName
- is the event type name of the events to filter for
public static PatternFilterExpr filter(java.lang.String eventTypeName, java.lang.String tagName)
eventTypeName
- is the event type name of the events to filter fortagName
- is the tag name to assign to matching events
public static PatternFilterExpr filter(Filter filter)
filter
- specifies the event type name and filter expression to filter for
public static PatternFilterExpr filter(Filter filter, java.lang.String tagName)
filter
- specifies the event type name and filter expression to filter fortagName
- is the tag name to assign to matching events
public static PatternGuardExpr guard(java.lang.String namespace, java.lang.String name, Expression[] parameters, PatternExpr guarded)
namespace
- is the guard objects namespace, i.e. "timer"name
- is the guard objects name, i.e. ""within"parameters
- is the guard objects optional parameters, i.e. integer 1 for 1 secondguarded
- is the pattern sub-expression to be guarded
public static PatternObserverExpr observer(java.lang.String namespace, java.lang.String name, Expression[] parameters)
namespace
- is the observer objects namespace, i.e. "timer"name
- is the observer objects name, i.e. ""within"parameters
- is the observer objects optional parameters, i.e. integer 1 for 1 second
public static PatternGuardExpr timerWithin(double seconds, PatternExpr guarded)
seconds
- is the number of seconds for the guardguarded
- is the sub-expression to guard
public static PatternGuardExpr whileGuard(PatternExpr guarded, Expression expression)
expression
- expression to evaluate against matchesguarded
- is the sub-expression to guard
public static PatternGuardExpr timerWithinMax(double seconds, int max, PatternExpr guarded)
seconds
- is the number of seconds for the guardmax
- the maximum number of invocations for the guardguarded
- is the sub-expression to guard
public static PatternObserverExpr timerInterval(double seconds)
seconds
- is the number of seconds in the interval
public static PatternNotExpr notFilter(java.lang.String eventTypeName)
eventTypeName
- is the event type name to filter for
public static PatternNotExpr notFilter(java.lang.String name, java.lang.String tagName)
name
- is the event type name to filter fortagName
- is the tag name to assign to matching events
public static PatternNotExpr notFilter(Filter filter)
filter
- specifies the event type name and filter expression to filter for
public static PatternNotExpr notFilter(Filter filter, java.lang.String tagName)
filter
- specifies the event type name and filter expression to filter fortagName
- is the tag name to assign to matching events
public static PatternNotExpr not(PatternExpr subexpression)
subexpression
- is the expression whose truth value to flip
public static PatternMatchUntilExpr matchUntil(Expression low, Expression high, PatternExpr match, PatternExpr until)
low
- - low number of matches, or null if no lower boundaryhigh
- - high number of matches, or null if no high boundarymatch
- - the pattern expression that is sought to match repeatedlyuntil
- - the pattern expression that ends matching (optional, can be null)
public static PatternObserverExpr timerAt(java.lang.Integer minutes, java.lang.Integer hours, java.lang.Integer daysOfMonth, java.lang.Integer month, java.lang.Integer daysOfWeek, java.lang.Integer seconds)
minutes
- a single integer value supplying the minute to fire the timer, or null for any (wildcard) minutehours
- a single integer value supplying the hour to fire the timer, or null for any (wildcard) hourdaysOfMonth
- a single integer value supplying the day of the month to fire the timer, or null for any (wildcard) day of the monthmonth
- a single integer value supplying the month to fire the timer, or null for any (wildcard) monthdaysOfWeek
- a single integer value supplying the days of the week to fire the timer, or null for any (wildcard) day of the weekseconds
- a single integer value supplying the second to fire the timer, or null for any (wildcard) second
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |