public abstract class PersistentEventLogLoader extends EventLogLoader
EventLogLoader implementation which keeps tracks of the last
EventLog instance, and always provides the next unindexed instance.
Resetting that saved value would restart indexing.| Modifier and Type | Field and Description |
|---|---|
protected String |
key
Key used to look configuration value; 'name'
|
protected SqlAction |
sql |
protected ITypes |
types |
batchSize, DEFAULT_BATCH_SIZE, excludes, log, query, queryService| Constructor and Description |
|---|
PersistentEventLogLoader() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteCurrentId() |
long |
getCurrentId()
Get current
EventLog id. |
String |
getKey() |
abstract void |
initialize()
Called when the configuration database does not contain a valid
current_id.
|
long |
more()
Should return an estimate of how many more
EventLog instances are
available for processing. |
protected EventLog |
query() |
void |
setCurrentId(long id) |
void |
setKey(String key) |
void |
setSqlAction(SqlAction sql) |
void |
setTypes(ITypes types) |
addEventLog, getBatchSize, hasNext, isStopSet, iterator, lastEventLog, next, nextEventLog, onApplicationEvent, remove, rollback, setBatchSize, setExcludes, setQueryService, setStopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorprotected String key
protected ITypes types
protected SqlAction sql
public void setKey(String key)
public String getKey()
public void setTypes(ITypes types)
public void setSqlAction(SqlAction sql)
protected EventLog query()
query in class EventLogLoaderpublic abstract void initialize()
public long getCurrentId()
EventLog id. If the lookup throws an exception,
either the configuration has been deleted or renamed, in which we need to
reinitialize, or the table is missing and something is wrong.public void setCurrentId(long id)
public void deleteCurrentId()
public long more()
EventLogLoaderEventLog instances are
available for processing. Some implementations may attempt to take extra
measures if the number is too large. Use 1 for a constant rather than
Long.MAX_VALUE. Use 0 to stop execution.more in class EventLogLoader
Version: 5.4.0-ice35-b74
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.