com.norconex.committer
Class BatchableCommitter
java.lang.Object
com.norconex.committer.BatchableCommitter
- All Implemented Interfaces:
- ICommitter, Serializable
- Direct Known Subclasses:
- FileSystemQueueCommitter
public abstract class BatchableCommitter
- extends Object
- implements ICommitter
Base implementation offering to batch the committing of documents
(additions and deletions alike).
- Author:
- Pascal Essiembre
- See Also:
- Serialized Form
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE
- See Also:
- Constant Field Values
BatchableCommitter
public BatchableCommitter()
BatchableCommitter
public BatchableCommitter(int batchSize)
getBatchSize
public int getBatchSize()
setBatchSize
public void setBatchSize(int batchSize)
queueAdd
public final void queueAdd(String reference,
File document,
Properties metadata)
- Description copied from interface:
ICommitter
- Queues a new or modified document. These queued documents should
be sent to their target destination when commit is called.
- Specified by:
queueAdd
in interface ICommitter
- Parameters:
reference
- document reference (e.g. URL)document
- text documentmetadata
- document metadata
queueBatchableAdd
protected abstract void queueBatchableAdd(String reference,
File document,
Properties metadata)
- Queues a document to be added.
- Parameters:
reference
- document referencedocument
- document filemetadata
- document metadata
queueRemove
public final void queueRemove(String ref,
File document,
Properties metadata)
- Description copied from interface:
ICommitter
- Queues a document for removal. These queued documents should
be sent to their target destination for deletion when commit is called.
- Specified by:
queueRemove
in interface ICommitter
- Parameters:
ref
- document reference (e.g. URL)document
- text documentmetadata
- document metadata
queueBatchableRemove
protected abstract void queueBatchableRemove(String ref,
File document,
Properties metadata)
- Queues a document to be deleted.
- Parameters:
reference
- document referencedocument
- document filemetadata
- document metadata
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2013 Norconex Inc.. All Rights Reserved.