|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.fulltext.FullTextIndexer
public class FullTextIndexer
Simple action which can be done in an asynchronous thread in order to index
Hibernate entities. Attempts to index each EventLog
passed from the
EventLogLoader
multiple times on failure. Eventually
Field Summary | |
---|---|
protected EventLogLoader |
loader
|
protected int |
reps
|
Constructor Summary | |
---|---|
FullTextIndexer(EventLogLoader ll)
|
Method Summary | |
---|---|
protected Class |
asClassOrNull(String str)
|
String |
description()
Returns a description of what this work will be doing for logging purposes. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final EventLogLoader loader
protected int reps
Constructor Detail |
---|
public FullTextIndexer(EventLogLoader ll)
Method Detail |
---|
public void setRepetitions(int reps)
public String description()
Executor.Work
description
in interface Executor.Work
@Transactional(readOnly=false, isolation=READ_UNCOMMITTED) public Object doWork(org.hibernate.Session session, ServiceFactory sf)
doIndexing(FullTextSession)
within a Lucene transaction.
doIndexing(FullTextSession)
will also be called
doWork
in interface Executor.Work
session
- 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 Class asClassOrNull(String str)
protected ome.model.IObject get(org.hibernate.Session session, Class type, long id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.