@Deprecated public class FullTextIndexer extends Executor.SimpleWork implements org.springframework.context.ApplicationContextAware
EventLog
passed from the
EventLogLoader
multiple times on failure. EventuallyModifier and Type | Field and Description |
---|---|
protected long |
batch
Deprecated.
|
protected Timer |
batchTimer
Deprecated.
|
protected Histogram |
completeFast
Deprecated.
|
protected Histogram |
completeSlow
Deprecated.
|
protected OmeroContext |
context
Deprecated.
|
static int |
DEFAULT_REPORTING_LOOPS
Deprecated.
Default number of loops to wait if no external value is set.
|
protected boolean |
dryRun
Deprecated.
|
protected EventLogLoader |
loader
Deprecated.
|
protected ParserSession |
parserSession
Deprecated.
|
protected int |
reportingLoops
Deprecated.
Frequency with which the percentage done should be calculated.
|
protected int |
reps
Deprecated.
|
description
Constructor and Description |
---|
FullTextIndexer(EventLogLoader ll)
Deprecated.
|
FullTextIndexer(EventLogLoader ll,
Metrics metrics)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Class |
asClassOrNull(java.lang.String str)
Deprecated.
|
int |
doIndexing(org.hibernate.search.FullTextSession session)
Deprecated.
|
boolean |
doMore(int count)
Deprecated.
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. |
java.lang.Object |
doWork(org.hibernate.Session session,
ServiceFactory sf)
Deprecated.
Runs
doIndexing(FullTextSession) within a Lucene transaction. |
protected IObject |
get(org.hibernate.Session session,
java.lang.Class type,
long id)
Deprecated.
|
protected void |
handleEventLog(org.hibernate.search.FullTextSession session,
EventLog eventLog)
Deprecated.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext ctx)
Deprecated.
|
void |
setDryRun(boolean dryRun)
Deprecated.
|
void |
setRepetitions(int reps)
Deprecated.
Spring injector.
|
void |
setReportingLoops(int loops)
Deprecated.
|
void |
setSqlAction(SqlAction sql)
Deprecated.
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
public static final int DEFAULT_REPORTING_LOOPS
protected final EventLogLoader loader
protected final ParserSession parserSession
protected final Timer batchTimer
protected final Histogram completeSlow
protected final Histogram completeFast
protected int reps
protected long batch
protected int reportingLoops
protected boolean dryRun
protected OmeroContext context
public FullTextIndexer(EventLogLoader ll)
public FullTextIndexer(EventLogLoader ll, Metrics metrics)
public void setRepetitions(int reps)
public void setReportingLoops(int loops)
public void setDryRun(boolean dryRun)
public void setApplicationContext(org.springframework.context.ApplicationContext ctx)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public void setSqlAction(SqlAction sql)
setSqlAction
in class Executor.SimpleWork
@Transactional(readOnly=false, isolation=SERIALIZABLE) public java.lang.Object doWork(org.hibernate.Session session, ServiceFactory sf)
doIndexing(FullTextSession)
within a Lucene transaction.
doIndexing(FullTextSession)
will also be calleddoWork
in interface Executor.Work
session
- non null.sf
- non null.public int doIndexing(org.hibernate.search.FullTextSession session)
protected void handleEventLog(org.hibernate.search.FullTextSession session, EventLog eventLog)
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 java.lang.Class asClassOrNull(java.lang.String str)
protected IObject get(org.hibernate.Session session, java.lang.Class type, long id)
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.