Class 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.
    • Field Detail

      • events

        protected List<com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent> events
        events to persist.
    • Constructor Detail

      • EventTimeSlice

        public EventTimeSlice​(long ts)
        Parameters:
        ts - Time slice in ms to hold events for.
    • 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