public class FullTextIndexer extends Executor.SimpleWork
EventLog
passed from the
EventLogLoader
multiple times on failure. EventuallyModifier and Type | Field and Description |
---|---|
protected EventLogLoader |
loader |
protected int |
reps |
description
Constructor and Description |
---|
FullTextIndexer(EventLogLoader ll) |
Modifier and Type | Method and Description |
---|---|
protected Class |
asClassOrNull(String str) |
int |
doIndexing(org.hibernate.search.FullTextSession session) |
boolean |
doMore(int count)
Default implementation suggests doing more if fewer than
reps
runs have been made and if there are still more than
EventLogLoader.batchSize x 100 backlog entries. |
Object |
doWork(org.hibernate.Session session,
ServiceFactory sf)
Runs
doIndexing(FullTextSession) within a Lucene transaction. |
protected ome.model.IObject |
get(org.hibernate.Session session,
Class type,
long id) |
void |
setRepetitions(int reps)
Spring injector.
|
void |
setSqlAction(ome.util.SqlAction sql)
Since these instances are used repeatedly, we need to check for
already set SqlAction
|
getSqlAction
description
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
description
protected final EventLogLoader loader
protected int reps
public FullTextIndexer(EventLogLoader ll)
public void setRepetitions(int reps)
public void setSqlAction(ome.util.SqlAction sql)
setSqlAction
in class Executor.SimpleWork
@Transactional(readOnly=false, isolation=SERIALIZABLE) public Object doWork(org.hibernate.Session session, ServiceFactory sf)
doIndexing(FullTextSession)
within a Lucene transaction.
doIndexing(FullTextSession)
will also be calledsession
- non null.sf
- non null.public int doIndexing(org.hibernate.search.FullTextSession session)
public boolean doMore(int count)
reps
runs have been made and if there are still more than
EventLogLoader.batchSize
x 100 backlog entries.
This is based on the assumption that indexing runs roughly 120 times an
hour, so if there are more than an hours worth of batches, do extra work
to catch up.protected ome.model.IObject get(org.hibernate.Session session, Class type, long id)
Version: 4.4.12-ice34-b116
Copyright © 2014 The University of Dundee & Open Microscopy Environment. All Rights Reserved.