Class EventTimeSlice
- java.lang.Object
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.playback.EventTimeSlice
-
public class EventTimeSlice extends Object
This class holds events that were processed by the MissedEventPlaybackManager for the most recent timestamp. For example, if 3 events were received at t1, they would be present in the Event Slice. However, if another event is processed at t2, then the Event Slice would evict the previous events and only keep the new event at t2. Created by scott.hebert@ericsson.com on 12/12/14.
-
-
Constructor Summary
Constructors Constructor Description EventTimeSlice(long ts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent evt)
Add an event to the list.List<com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent>
getEvents()
get the events for this time slice.long
getTimeSlice()
Get the time slice in ms.static EventTimeSlice
shallowCopy(EventTimeSlice ets)
Creates a shallow copy of a given EventTimeSlice.
-
-
-
Field Detail
-
events
protected List<com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent> events
events to persist.
-
-
Method Detail
-
getTimeSlice
public long getTimeSlice()
Get the time slice in ms.- Returns:
- this time slice
-
addEvent
public void addEvent(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent evt)
Add an event to the list.- Parameters:
evt
- Event to be persisted.
-
getEvents
public List<com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent> getEvents()
get the events for this time slice.- Returns:
- events that pertain to the time slice.
-
shallowCopy
public static EventTimeSlice shallowCopy(EventTimeSlice ets)
Creates a shallow copy of a given EventTimeSlice.- Parameters:
ets
- the EventTimeSlice to copy- Returns:
- the copy
-
-