Skip to content

Instantly share code, notes, and snippets.

@jetgeng
Created October 15, 2012 08:07
Show Gist options
  • Save jetgeng/3891325 to your computer and use it in GitHub Desktop.
Save jetgeng/3891325 to your computer and use it in GitHub Desktop.
Epser Pattern :and , timer
@Name('Select-Commit') @Audit
select a.* from pattern [ a=CommitEvent(userName='tom') and timer:at(0, 16, *, *, *) ]
@jetgeng
Copy link
Author

jetgeng commented Oct 15, 2012

2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression 0 result 0
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression 16 result 16
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression * result com.espertech.esper.type.WildcardParameter@31a734ff
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression * result com.espertech.esper.type.WildcardParameter@31a734ff
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression * result com.espertech.esper.type.WildcardParameter@31a734ff
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression 0 result 0
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression 16 result 16
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression * result com.espertech.esper.type.WildcardParameter@31a734ff
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression * result com.espertech.esper.type.WildcardParameter@31a734ff
2012-10-15 15:59:30 audit [INFO] Statement Select-Commit expression * result com.espertech.esper.type.WildcardParameter@31a734ff
2012-10-15 15:59:31 audit [INFO] Statement Select-Commit pattern-instances (a=CommitEvent(userName='tom')) increased to 1
2012-10-15 15:59:31 audit [INFO] Statement Select-Commit schedule add MINUTES={0} HOURS={16} DAYS_OF_MONTH={null} MONTHS={null} DAYS_OF_WEEK={null} handle com.espertech.esper.pattern.observer.TimerAtObserver@7463e563
2012-10-15 15:59:31 audit [INFO] Statement Select-Commit pattern-instances (timer:at(0, 16, *, *, *)) increased to 1
2012-10-15 15:59:31 audit [INFO] Statement Select-Commit pattern-instances (a=CommitEvent(userName='tom') and timer:at(0, 16, *, *, *)) increased to 1
2012-10-15 15:59:31 audit [INFO] Statement Select-Commit pattern (a=CommitEvent(userName='tom')) evaluate-true { from: EvalFilterStateNode@78d23e53 map: {a=CommitEvent [uuid=342ef, userName=tom, email=[email protected]]} quitted: true}
2012-10-15 15:59:31 audit [INFO] Statement Select-Commit pattern-instances (a=CommitEvent(userName='tom')) decreased to 0
2012-10-15 16:00:00 audit [INFO] Statement Select-Commit schedule trigger handle com.espertech.esper.pattern.observer.TimerAtObserver@7463e563
2012-10-15 16:00:00 audit [INFO] Statement Select-Commit pattern (timer:at(0, 16, *, *, *)) evaluate-true { from: EvalObserverStateNode@3edd89f9 map: {a=} quitted: true}
2012-10-15 16:00:00 audit [INFO] Statement Select-Commit pattern-instances (timer:at(0, 16, *, *, *)) decreased to 0
2012-10-15 16:00:00 audit [INFO] Statement Select-Commit pattern (a=CommitEvent(userName='tom') and timer:at(0, 16, *, *, *)) evaluate-true { from: EvalAndStateNode@52fc9d2b map: {a=CommitEvent [uuid=342ef, userName=tom, email=[email protected]]} quitted: true}
2012-10-15 16:00:00 audit [INFO] Statement Select-Commit pattern-instances (a=CommitEvent(userName='tom') and timer:at(0, 16, *, *, *)) decreased to 0
CommitEvent [uuid=342ef, userName=tom, email=[email protected]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment