public abstract class AbstractBatchCommitter extends AbstractFileQueueCommitter
AbstractMappedCommitter.
Subclasses implementing IXMLConfigurable should allow this inner
configuration:
<commitBatchSize>
(max number of documents to send IDOL at once)
</commitBatchSize>
<queueDir>(optional path where to queue files)</queueDir>
<queueSize>(max queue size before committing)</queueSize>
<maxRetries>(max retries upon commit failures)</maxRetries>
<maxRetryWait>(max delay between retries)</maxRetryWait>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COMMIT_BATCH_SIZE
Default commit batch size.
|
DEFAULT_QUEUE_DIRDEFAULT_QUEUE_SIZEDEFAULT_DOCUMENT_REFERENCE| Constructor and Description |
|---|
AbstractBatchCommitter()
Constructor.
|
AbstractBatchCommitter(int commitBatchSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
commitAddition(IAddOperation operation)
Allow subclasses to commit a file to be added.
|
protected abstract void |
commitBatch(List<ICommitOperation> batch)
Commits a group of operation.
|
protected void |
commitComplete()
Allow subclasses to operate upon the end of the commit operation.
|
protected void |
commitDeletion(IDeleteOperation operation)
Allow subclasses to commit a file to be deleted.
|
boolean |
equals(Object obj) |
int |
getCommitBatchSize()
Gets the commit batch size.
|
int |
getMaxRetries()
Gets the maximum number of retries upon batch commit failure.
|
long |
getMaxRetryWait()
Gets the maximum wait time before retrying a failed commit.
|
int |
hashCode() |
void |
setCommitBatchSize(int commitBatchSize)
Sets the commit batch size.
|
void |
setMaxRetries(int maxRetries)
Sets the maximum number of retries upon batch commit failure.
|
void |
setMaxRetryWait(long maxRetryWait)
Sets the maximum wait time before retrying a failed commit.
|
String |
toString() |
commit, getQueueDir, prepareCommitAddition, prepareCommitDeletion, queueAddittion, queueRemoval, setQueueDirgetQueueSize, queueAdd, queueRemove, setQueueSizepublic static final int DEFAULT_COMMIT_BATCH_SIZE
public AbstractBatchCommitter()
public AbstractBatchCommitter(int commitBatchSize)
commitBatchSize - commit batch sizepublic int getCommitBatchSize()
public void setCommitBatchSize(int commitBatchSize)
commitBatchSize - commit batch sizepublic int getMaxRetries()
public void setMaxRetries(int maxRetries)
maxRetries - maximum number of retriespublic long getMaxRetryWait()
public void setMaxRetryWait(long maxRetryWait)
maxRetryWait - maximum wait timeprotected final void commitAddition(IAddOperation operation)
AbstractFileQueueCommitterAllow subclasses to commit a file to be added.
The subclass has the responsibility of deleting the file once the content is permanently stored. The subclass may decide to further batch those documents before storing them if more efficient this way.
commitAddition in class AbstractFileQueueCommitteroperation - the document operation to performprotected final void commitDeletion(IDeleteOperation operation)
AbstractFileQueueCommitterAllow subclasses to commit a file to be deleted.
The subclass has the responsibility of deleting the file once the content is permanently stored. The subclass may decide to further batch those deletions before storing them if more efficient that way.
commitDeletion in class AbstractFileQueueCommitteroperation - the document operation to performprotected void commitComplete()
AbstractFileQueueCommittercommitComplete in class AbstractFileQueueCommitterprotected abstract void commitBatch(List<ICommitOperation> batch)
batch - the group of operationspublic int hashCode()
hashCode in class AbstractFileQueueCommitterpublic boolean equals(Object obj)
equals in class AbstractFileQueueCommitterpublic String toString()
toString in class AbstractFileQueueCommitterCopyright © 2009-2014 Norconex Inc.. All Rights Reserved.