public class OutputLimitClause extends Object implements Serializable
Constructor and Description |
---|
OutputLimitClause()
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
Double frequency)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
Double frequency,
String frequencyVariable,
OutputLimitUnit unit)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
Expression[] crontabAtParameters)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
Expression whenExpression,
List<Assignment> thenAssignments)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
OutputLimitUnit unit)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
OutputLimitUnit unit,
TimePeriodExpression afterTimePeriod,
Integer afterNumberOfEvents)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
String frequencyVariable)
Ctor.
|
OutputLimitClause(OutputLimitSelector selector,
TimePeriodExpression timePeriodExpression)
Ctor.
|
OutputLimitClause(TimePeriodExpression afterTimePeriodExpression)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
OutputLimitClause |
addThenAssignment(Expression assignmentExpression)
Adds a then-keyword variable assigment for use with the when-keyword.
|
OutputLimitClause |
afterNumberOfEvents(Integer afterNumberOfEvents)
Sets the after-keyword number of events, or null if undefined.
|
OutputLimitClause |
afterTimePeriodExpression(TimePeriodExpression afterTimePeriodExpression)
Sets the after-keyword time period.
|
static OutputLimitClause |
create(double frequency)
Creates an output limit clause.
|
static OutputLimitClause |
create(Expression whenExpression)
Creates an output limit clause with a when-expression and optional then-assignment expressions to be added.
|
static OutputLimitClause |
create(OutputLimitSelector selector,
double frequency)
Creates an output limit clause.
|
static OutputLimitClause |
create(OutputLimitSelector selector,
String frequencyVariable)
Creates an output limit clause.
|
static OutputLimitClause |
create(OutputLimitSelector selector,
TimePeriodExpression timePeriodExpression)
Creates an output limit clause.
|
static OutputLimitClause |
create(String frequencyVariable)
Creates an output limit clause.
|
static OutputLimitClause |
create(TimePeriodExpression timePeriodExpression)
Creates an output limit clause.
|
static OutputLimitClause |
createAfter(int afterNumEvents)
Create with after-only and number of events.
|
static OutputLimitClause |
createAfter(TimePeriodExpression afterTimePeriodExpression)
Create with after-only time period.
|
static OutputLimitClause |
createSchedule(Expression[] scheduleParameters)
Creates an output limit clause with a crontab 'at' schedule parameters, see
FrequencyParameter and related. |
Integer |
getAfterNumberOfEvents()
Returns the after-keyword number of events, or null if undefined.
|
Expression |
getAfterTimePeriodExpression()
Returns the after-keyword time period.
|
Expression |
getAndAfterTerminateAndExpr()
Returns the optional expression evaluated when a context partition terminates before triggering output.
|
List<Assignment> |
getAndAfterTerminateThenAssignments()
Returns the set-assignments to execute when a context partition terminates.
|
Expression[] |
getCrontabAtParameters()
Returns the crontab parameters, or null if not using crontab-like schedule.
|
Double |
getFrequency()
Returns output frequency.
|
String |
getFrequencyVariable()
Returns the variable name of the variable providing output rate frequency values, or null if the frequency is a fixed value.
|
OutputLimitSelector |
getSelector()
Returns the selector indicating the events to output.
|
List<Assignment> |
getThenAssignments()
Returns the list of optional then-keyword variable assignments, if any
|
Expression |
getTimePeriodExpression()
Returns the time period, or null if none provided.
|
OutputLimitUnit |
getUnit()
Returns the unit the frequency is in.
|
Expression |
getWhenExpression()
Returns the expression that controls output for use with the when-keyword.
|
boolean |
isAndAfterTerminate()
Returns true for output upon termination of a context partition
|
void |
setAfterNumberOfEvents(Integer afterNumberOfEvents)
Sets the after-keyword number of events, or null if undefined.
|
void |
setAfterTimePeriodExpression(Expression afterTimePeriodExpression)
Sets the after-keyword time period.
|
void |
setAndAfterTerminate(boolean andAfterTerminate)
Set true for output upon termination of a context partition
|
void |
setAndAfterTerminateAndExpr(Expression andAfterTerminateAndExpr)
Sets an optional expression evaluated when a context partition terminates before triggering output.
|
void |
setAndAfterTerminateThenAssignments(List<Assignment> andAfterTerminateThenAssignments)
Sets the set-assignments to execute when a context partition terminates.
|
void |
setCrontabAtParameters(Expression[] crontabAtParameters)
Crontab.
|
void |
setFrequency(Double frequency)
Set frequency.
|
void |
setFrequencyVariable(String frequencyVariable)
Sets the variable name of the variable providing output rate frequency values, or null if the frequency is a fixed value.
|
void |
setSelector(OutputLimitSelector selector)
Sets the selector indicating the events to output.
|
void |
setThenAssignments(List<Assignment> thenAssignments)
Set then.
|
void |
setTimePeriodExpression(Expression timePeriodExpression)
Crontab
|
void |
setUnit(OutputLimitUnit unit)
Sets the unit the frequency is in.
|
void |
setWhenExpression(Expression whenExpression)
Set when.
|
void |
toEPL(StringWriter writer)
Renders the clause in textual representation.
|
public OutputLimitClause()
public OutputLimitClause(OutputLimitSelector selector, OutputLimitUnit unit)
selector
- selectorunit
- unitpublic OutputLimitClause(OutputLimitSelector selector, Double frequency)
selector
- is the events to selectfrequency
- a frequency to output atpublic OutputLimitClause(OutputLimitSelector selector, TimePeriodExpression timePeriodExpression)
selector
- is the events to selecttimePeriodExpression
- the unit for the frequencypublic OutputLimitClause(TimePeriodExpression afterTimePeriodExpression)
afterTimePeriodExpression
- timer period for after.public OutputLimitClause(OutputLimitSelector selector, String frequencyVariable)
selector
- is the events to selectfrequencyVariable
- is the variable name providing output rate frequency valuespublic OutputLimitClause(OutputLimitSelector selector, Double frequency, String frequencyVariable, OutputLimitUnit unit)
selector
- is the events to selectfrequency
- a frequency to output atunit
- the unit for the frequencyfrequencyVariable
- is the variable name providing output rate frequency valuespublic OutputLimitClause(OutputLimitSelector selector, OutputLimitUnit unit, TimePeriodExpression afterTimePeriod, Integer afterNumberOfEvents)
selector
- is the events to selectunit
- the unit of selectionafterTimePeriod
- after-keyword time periodafterNumberOfEvents
- after-keyword number of eventspublic OutputLimitClause(OutputLimitSelector selector, Expression[] crontabAtParameters)
selector
- is the events to selectcrontabAtParameters
- the crontab schedule parameterspublic OutputLimitClause(OutputLimitSelector selector, Expression whenExpression, List<Assignment> thenAssignments)
selector
- is the events to selectwhenExpression
- the boolean expression to evaluate to control outputthenAssignments
- the variable assignments, optional or an empty listpublic static OutputLimitClause create(TimePeriodExpression timePeriodExpression)
timePeriodExpression
- a frequency to output atpublic static OutputLimitClause createAfter(TimePeriodExpression afterTimePeriodExpression)
afterTimePeriodExpression
- time periodpublic static OutputLimitClause createAfter(int afterNumEvents)
afterNumEvents
- num eventspublic static OutputLimitClause create(OutputLimitSelector selector, TimePeriodExpression timePeriodExpression)
selector
- is the events to selecttimePeriodExpression
- a frequency to output atpublic static OutputLimitClause create(OutputLimitSelector selector, double frequency)
selector
- is the events to selectfrequency
- a frequency to output atpublic static OutputLimitClause create(OutputLimitSelector selector, String frequencyVariable)
selector
- is the events to selectfrequencyVariable
- is the variable providing the output limit frequencypublic static OutputLimitClause create(double frequency)
frequency
- a frequency to output atpublic static OutputLimitClause create(String frequencyVariable)
frequencyVariable
- is the variable name providing output rate frequency valuespublic static OutputLimitClause create(Expression whenExpression)
whenExpression
- the expression that returns true to trigger outputpublic static OutputLimitClause createSchedule(Expression[] scheduleParameters)
FrequencyParameter
and related.scheduleParameters
- the crontab schedule parameterspublic OutputLimitSelector getSelector()
public void setSelector(OutputLimitSelector selector)
selector
- to setpublic Double getFrequency()
public OutputLimitUnit getUnit()
public void setUnit(OutputLimitUnit unit)
unit
- is the unit for the frequencypublic String getFrequencyVariable()
public void setFrequencyVariable(String frequencyVariable)
frequencyVariable
- variable name or null if no variable is usedpublic Expression getWhenExpression()
public Expression getTimePeriodExpression()
public List<Assignment> getThenAssignments()
public OutputLimitClause addThenAssignment(Expression assignmentExpression)
assignmentExpression
- expression to calculate new valuepublic Expression[] getCrontabAtParameters()
public boolean isAndAfterTerminate()
public void setAndAfterTerminate(boolean andAfterTerminate)
andAfterTerminate
- indicatorpublic void toEPL(StringWriter writer)
writer
- to output topublic Expression getAfterTimePeriodExpression()
public void setAfterTimePeriodExpression(Expression afterTimePeriodExpression)
afterTimePeriodExpression
- after-keyword time periodpublic OutputLimitClause afterTimePeriodExpression(TimePeriodExpression afterTimePeriodExpression)
afterTimePeriodExpression
- after-keyword time periodpublic Integer getAfterNumberOfEvents()
public void setFrequency(Double frequency)
frequency
- to setpublic void setWhenExpression(Expression whenExpression)
whenExpression
- to setpublic void setThenAssignments(List<Assignment> thenAssignments)
thenAssignments
- to setpublic void setCrontabAtParameters(Expression[] crontabAtParameters)
crontabAtParameters
- to setpublic void setTimePeriodExpression(Expression timePeriodExpression)
timePeriodExpression
- to setpublic void setAfterNumberOfEvents(Integer afterNumberOfEvents)
afterNumberOfEvents
- set num events for after-keywordpublic OutputLimitClause afterNumberOfEvents(Integer afterNumberOfEvents)
afterNumberOfEvents
- set num events for after-keywordpublic Expression getAndAfterTerminateAndExpr()
public void setAndAfterTerminateAndExpr(Expression andAfterTerminateAndExpr)
andAfterTerminateAndExpr
- expressionpublic List<Assignment> getAndAfterTerminateThenAssignments()
public void setAndAfterTerminateThenAssignments(List<Assignment> andAfterTerminateThenAssignments)
andAfterTerminateThenAssignments
- set-assignments