public class EventBacklog extends Object
EventLog instances
 for later parsing. This container, however, will not add more than two
 logs with the same (id, eventType, action) tuple.
 
 Further, the container can only either be in the adding state or the removing
 state. A newly created EventBacklog is in the adding state. The
 popping state is entered the first time that remove() is called. And
 the adding state will only be re-entered, once remove() has returned
 null and logs is empty.
 
 All calls to add(EventLog) while in the popping state will return
 false.| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | addingSwitch between the adding and the removing states. | 
| Constructor and Description | 
|---|
| EventBacklog() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | add(EventLog log) | 
| void | flipState()Flips the  EventBacklogto the "adding" state if it is empty,
 otherwise to the "removing" state. | 
| EventLog | remove()Removes and returns the next  EventLoginstance or null if none is
 present. | 
| boolean | removingOnly()Check the current state of the  EventBacklog. | 
public boolean add(EventLog log)
public EventLog remove()
EventLog instance or null if none is
 present. Also cleans up any tracking information for the given
 EventLog.public void flipState()
EventBacklog to the "adding" state if it is empty,
 otherwise to the "removing" state. This is necessary since the indexing
 happens only at flush time in the
 FullTextIndexer. This
 restriction means in any one batch only either backlog or new event logs
 will be processed.EventLogLoader.hasNext()public boolean removingOnly()
EventBacklog. If in the
 "removingOnly" state, then any calls to add(EventLog) will
 return false.
                
                
Version: 5.2.5-ice35-b28
Copyright © 2016 The University of Dundee & Open Microscopy Environment. All Rights Reserved.