Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
Data::EventStream::Window - Perl extension for event processing
VERSION
This document describes Data::EventStream::Window version 0.08
DESCRIPTION
This class represents time window for which aggregator aggregates data. Normally window objects are passed to aggregators' callbacks and user has no need to build them himself.
METHODS
$self->count
Number of events in the window
$self->start_time
Window start time
$self->end_time
Window end time
$self->time_length
Window length in time
$self->get_event($idx)
Returns event with the specified index. 0 being the latest, most recent event, and -1 being the oldest event.
$self->get_iterator
Returns callable iterator object. Each time you call it, it returns the next event starting from the latest one. For example:
my $next_event = $win->get_iterator;
while ( my $event = $next_event->() ) {
...
}