I am trying to implement an EPL query that can pick up the avg for Time(t) & Time(t-1).
For example:
a) in the first 5 seconds (seconds 0-5) there are 2 events with an avg of 12
b) in the next 5 seconds (seconds 5-10) there are 3 events with an avg of 23 , and in the EPL query that catches this information, I am able to also see the avg of 12 from the previous time window of the first 5 seconds
The idea I have is to stagger the objects/queries in such a way that the final epl query has a snapshot of Time(t) & Time(t-1), as seen in the virtually created object ScoreInfoBeforeAfter . However it's not working.
Any ideas would be greatly appreciated. Thanks.
~~~~
// The object being published to the Esper stream:
class ScoreEvent { int score; ... }