ome.services.pixeldata
Class PersistentEventLogLoader

java.lang.Object
  extended by ome.services.eventlogs.EventLogLoader
      extended by ome.services.eventlogs.PersistentEventLogLoader
          extended by ome.services.pixeldata.PersistentEventLogLoader
All Implemented Interfaces:
Iterable<ome.model.meta.EventLog>, EventListener, Iterator<ome.model.meta.EventLog>, org.springframework.context.ApplicationListener

public class PersistentEventLogLoader
extends PersistentEventLogLoader

EventLogLoader implementation which keeps tracks of the last EventLog instance, and always provides the next unindexed instance. Reseting that saved value would restart indexing.

Since:
Beta4.3
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
protected  List<long[]> dataPerUser
           
protected  long lowestEntityId
          The lowest entity id from a single dataPerUser set.
protected  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, queryService
 
Constructor Summary
PersistentEventLogLoader(String repo)
           
 
Method Summary
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 the dataPerUser "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, more, setCurrentId, setKey, setSqlAction, setTypes
 
Methods inherited from class ome.services.eventlogs.EventLogLoader
addEventLog, getBatchSize, hasNext, iterator, lastEventLog, next, nextEventLog, onApplicationEvent, remove, rollback, setBatchSize, setExcludes, setQueryService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repo

protected final String repo

lowestEntityId

protected long lowestEntityId
The lowest entity id from a single dataPerUser set.


dataPerUser

protected List<long[]> dataPerUser
Constructor Detail

PersistentEventLogLoader

public PersistentEventLogLoader(String repo)
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 class PersistentEventLogLoader

query

protected ome.model.meta.EventLog query()
Uses data from the dataPerUser "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 the PersistentEventLogLoader.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 class PersistentEventLogLoader

available

protected boolean available()

pop

protected ome.model.meta.EventLog pop()


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.