public final class ScheduledCommitPolicy extends AbstractCommitPolicy
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DELAY_MS |
indexWriterHolder
Constructor and Description |
---|
ScheduledCommitPolicy(org.hibernate.search.backend.impl.lucene.IndexWriterHolder indexWriterHolder,
String indexName,
int delay,
ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
int |
getDelay() |
ScheduledExecutorService |
getScheduledExecutorService()
Exposed as public method for tests only
|
void |
onChangeSetApplied(boolean someFailureHappened,
boolean streaming)
A changeset was applied to the index
|
void |
onClose()
Backend shutting down
|
void |
onFlush()
An explicit flush was requested
|
getIndexWriter, getIndexWriter
public static final int DEFAULT_DELAY_MS
public ScheduledCommitPolicy(org.hibernate.search.backend.impl.lucene.IndexWriterHolder indexWriterHolder, String indexName, int delay, ErrorHandler errorHandler)
public int getDelay()
public void onChangeSetApplied(boolean someFailureHappened, boolean streaming)
CommitPolicy
someFailureHappened
- true if any failure happenedstreaming
- true if changesets are part of a stream of operationspublic ScheduledExecutorService getScheduledExecutorService()
public void onFlush()
CommitPolicy
public void onClose()
CommitPolicy
onClose
in interface CommitPolicy
onClose
in class AbstractCommitPolicy
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved