Package com.norconex.committer.core3
Interface ICommitter
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractBatchCommitter,AbstractCommitter,AbstractFSCommitter,CSVFileCommitter,JSONFileCommitter,LogCommitter,MemoryCommitter,XMLFileCommitter
Commits documents to their final destination (e.g. search engine).
Implementors are encouraged to use one of the abstract committer classes,
which handles event handling and common use cases.
- Since:
- 3.0.0
- Author:
- Pascal Essiembre
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(ICommitterRequest request) Determines whether a request should be committed.voidclean()Cleans any persisted information (e.g. queue) to ensure next run will start fresh.voidclose()Closes this committer and releases resources.voiddelete(DeleteRequest deleteRequest) Deletes a document from the target repository.voidinit(CommitterContext committerContext) Initializes this committer with execution context.voidupsert(UpsertRequest upsertRequest) Creates or updates a document in the target repository.
-
Method Details
-
init
Initializes this committer with execution context.- Parameters:
committerContext- committer execution context- Throws:
CommitterException- initialization failure
-
accept
Determines whether a request should be committed.- Parameters:
request- request to evaluate- Returns:
trueif the request is accepted- Throws:
CommitterException- acceptance check failure
-
upsert
Creates or updates a document in the target repository.- Parameters:
upsertRequest- request to upsert- Throws:
CommitterException- upsert failure
-
delete
Deletes a document from the target repository.- Parameters:
deleteRequest- request to delete- Throws:
CommitterException- delete failure
-
close
Closes this committer and releases resources.- Specified by:
closein interfaceAutoCloseable- Throws:
CommitterException- close failure
-
clean
Cleans any persisted information (e.g. queue) to ensure next run will start fresh. Calling this method on Committers not persisting anything between each execution will have no effect. This method does NOT delete anything previously committed on the target repository.- Throws:
CommitterException- something went wrong cleaning the committer.
-