Package ome.services.pixeldata
Class PersistentEventLogLoader
- java.lang.Object
-
- ome.services.eventlogs.EventLogLoader
-
- ome.services.eventlogs.PersistentEventLogLoader
-
- ome.services.pixeldata.PersistentEventLogLoader
-
- All Implemented Interfaces:
java.lang.Iterable<ome.model.meta.EventLog>
,java.util.EventListener
,java.util.Iterator<ome.model.meta.EventLog>
,org.springframework.context.ApplicationListener
public class PersistentEventLogLoader extends PersistentEventLogLoader
EventLogLoader
implementation which keeps tracks of the lastEventLog
instance, and always provides the next unindexed instance. Resetting that saved value would restart indexing.- Since:
- Beta4.3
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<long[]>
dataPerUser
protected long
lowestEntityId
The lowest entity id from a single dataPerUser set.protected int
numThreads
protected java.lang.String
repo
-
Fields inherited from class ome.services.eventlogs.PersistentEventLogLoader
key, sql, types
-
Fields inherited from class ome.services.eventlogs.EventLogLoader
batchSize, DEFAULT_BATCH_SIZE, excludes, log, query, queryService
-
-
Constructor Summary
Constructors Constructor Description PersistentEventLogLoader(java.lang.String repo, int numThreads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
available()
void
initialize()
Called when the configuration database does not contain a valid current_id.protected ome.model.meta.EventLog
pop()
protected ome.model.meta.EventLog
query()
Uses data from thedataPerUser
"queue" to allow new requests to be processed even if one user adds a large number of PIXELDATA events.-
Methods inherited from class ome.services.eventlogs.PersistentEventLogLoader
deleteCurrentId, getCurrentId, getKey, more, setCurrentId, setKey, setSqlAction, setTypes
-
Methods inherited from class ome.services.eventlogs.EventLogLoader
addEventLog, getBatchSize, hasNext, isStopSet, iterator, lastEventLog, next, nextEventLog, onApplicationEvent, remove, rollback, setBatchSize, setExcludes, setQueryService, setStop
-
-
-
-
Method Detail
-
initialize
public void initialize()
Description copied from class:PersistentEventLogLoader
Called when the configuration database does not contain a valid current_id.- Specified by:
initialize
in classPersistentEventLogLoader
-
query
protected ome.model.meta.EventLog query()
Uses data from thedataPerUser
"queue" to allow new requests to be processed even if one user adds a large number of PIXELDATA events. Only the lowest event log id will be saved as thePersistentEventLogLoader.getCurrentId()
meaning that some event logs will be processed multiple times. The call to create the pyramid must properly ignore existing pyramids.- Overrides:
query
in classPersistentEventLogLoader
-
available
protected boolean available()
-
pop
protected ome.model.meta.EventLog pop()
-
-