blob: e556afbca60ca817dc07598f0c892dd604fb9a4c [file] [log] [blame]
tomcbff9392014-09-10 00:45:23 -07001package org.onlab.onos.event;
2
3import java.util.List;
4
5/**
6 * Abstraction of an accumulator capable of collecting events and at some
7 * point in time triggers processing of all previously accumulated events.
8 */
9public interface EventAccumulator {
10
11 /**
12 * Adds an event to the current batch. This operation may, or may not
13 * trigger processing of the current batch of events.
14 *
15 * @param event event to be added to the current batch
16 */
17 void add(Event event);
18
19 /**
20 * Processes the specified list of accumulated events.
21 *
22 * @param events list of accumulated events
23 */
24 void processEvents(List<Event> events);
25
26}