Skip to content

Instantly share code, notes, and snippets.

@ldenson11
Created January 29, 2020 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldenson11/9ffcb095a36aa29c4dc92fbab38091be to your computer and use it in GitHub Desktop.
Save ldenson11/9ffcb095a36aa29c4dc92fbab38091be to your computer and use it in GitHub Desktop.
Pattern<MonitoringEvent, ?> warningPattern = Pattern.<MonitoringEvent>begin("First Event")
.subtype(TransactionEvent.class)
.where(evt -> evt.getTransaction() >= LARGE_TRANSACTION_THRESHOLD)
.next("Second Event")
.subtype(TransactionEvent.class)
.where(evt -> evt.getPIN() >= PIN_MISTYPE_THRESHOLD)
.within(Time.seconds(10));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment