AbstractFileQueueCommitter
@Deprecated public abstract class FileSystemQueueCommitter extends BatchableCommitter
Modifier and Type | Class and Description |
---|---|
class |
FileSystemQueueCommitter.QueuedAddedDocument
Deprecated.
Class representing a document addition.
|
class |
FileSystemQueueCommitter.QueuedDeletedDocument
Deprecated.
Class representing a document deletion.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_QUEUE_DIR
Deprecated.
Default queue directory.
|
DEFAULT_BATCH_SIZE
DEFAULT_DOCUMENT_REFERENCE
Constructor and Description |
---|
FileSystemQueueCommitter()
Deprecated.
Constructor.
|
FileSystemQueueCommitter(int batchSize)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
commit()
Deprecated.
Commits queued documents.
|
protected abstract void |
commitAddedDocument(FileSystemQueueCommitter.QueuedAddedDocument document)
Deprecated.
Allow subclasses to commit a file to be added.
|
protected abstract void |
commitComplete()
Deprecated.
Allow subclasses to operate upon the end of the commit operation.
|
protected abstract void |
commitDeletedDocument(FileSystemQueueCommitter.QueuedDeletedDocument document)
Deprecated.
Allow subclasses to commit a file to be deleted.
|
boolean |
equals(Object obj)
Deprecated.
|
String |
getQueueDir()
Deprecated.
Gets the queue directory.
|
int |
hashCode()
Deprecated.
|
protected void |
preCommitAddedDocument(FileSystemQueueCommitter.QueuedAddedDocument document)
Deprecated.
Optionally performs operations on a document to be added before
actually committing it.
|
protected void |
preCommitDeletedDocument(FileSystemQueueCommitter.QueuedDeletedDocument document)
Deprecated.
Optionally performs operations on a document to be deleted before
actually committing it.
|
protected void |
queueBatchableAdd(String reference,
File document,
Properties metadata)
Deprecated.
Queues a document to be added.
|
protected void |
queueBatchableRemove(String ref,
File document,
Properties metadata)
Deprecated.
Queues a document to be deleted.
|
void |
setQueueDir(String queueDir)
Deprecated.
Sets the queue directory.
|
String |
toString()
Deprecated.
|
getBatchSize, queueAdd, queueRemove, setBatchSize
public static final String DEFAULT_QUEUE_DIR
public FileSystemQueueCommitter()
public FileSystemQueueCommitter(int batchSize)
batchSize
- batch sizepublic String getQueueDir()
public void setQueueDir(String queueDir)
queueDir
- queue directoryprotected void queueBatchableAdd(String reference, File document, Properties metadata)
BatchableCommitter
queueBatchableAdd
in class BatchableCommitter
reference
- document referencedocument
- document filemetadata
- document metadataprotected void queueBatchableRemove(String ref, File document, Properties metadata)
BatchableCommitter
queueBatchableRemove
in class BatchableCommitter
ref
- document referencedocument
- document filemetadata
- document metadatapublic void commit()
ICommitter
protected abstract void commitAddedDocument(FileSystemQueueCommitter.QueuedAddedDocument document) throws IOException
Allow subclasses to commit a file to be added.
The subclass has the responsibility of deleting the file once the content
is permanently stored by invoking
FileSystemQueueCommitter.QueuedAddedDocument.deleteFromQueue()
.
The subclass may decide to further batch those documents before
storing them if more efficient this way.
document
- the document to commitIOException
protected abstract void commitDeletedDocument(FileSystemQueueCommitter.QueuedDeletedDocument document) throws IOException
Allow subclasses to commit a file to be deleted.
The subclass has the responsibility of deleting the file once the content
is permanently stored by invoking
FileSystemQueueCommitter.QueuedDeletedDocument.deleteFromQueue()
. The subclass may
decide to further batch those deletions before storing them if more
efficient that way.
document
- the document to commitIOException
protected abstract void commitComplete()
protected void preCommitAddedDocument(FileSystemQueueCommitter.QueuedAddedDocument document) throws IOException
document
- document to be addedIOException
protected void preCommitDeletedDocument(FileSystemQueueCommitter.QueuedDeletedDocument document) throws IOException
document
- document to be deletedIOException
public int hashCode()
hashCode
in class BatchableCommitter
public boolean equals(Object obj)
equals
in class BatchableCommitter
public String toString()
toString
in class BatchableCommitter
Copyright © 2009-2014 Norconex Inc.. All Rights Reserved.