Class CommitterService<T>
java.lang.Object
com.norconex.committer.core.service.CommitterService<T>
- Type Parameters:
T- type of committed objects
- All Implemented Interfaces:
Closeable,AutoCloseable
Wrapper around multiple Committers so they can all be handled as one
and facilitating integration with various clients.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CommitterService.CommitterServiceBuilder<T> builder()protected booleanvoidclean()Cleans all registered committers.voidclose()Closes all registered committers.Deletes an object using all accepting committers.boolean@NonNull Function<T, DeleteRequest> @NonNull Function<T, UpsertRequest> inthashCode()voidinit(CommitterContext baseContext) booleantoString()Updates or inserts an object using all accepting committers.
-
Method Details
-
isOperative
public boolean isOperative() -
init
- Throws:
CommitterServiceException
-
upsert
Updates or inserts an object using all accepting committers.- Parameters:
object- the object to upsert- Returns:
- committers having accepted and upserted the object
- Throws:
CommitterServiceException- wrapper around operation failure one or more of the registered committers (wraps last exception captured)
-
delete
Deletes an object using all accepting committers.- Parameters:
object- the object to delete- Returns:
- committers having accepted and deleted the object
- Throws:
CommitterServiceException- wrapper around operation failure one or more of the registered committers (wraps last exception captured)
-
close
Closes all registered committers.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
CommitterServiceException- wrapper around operation failure one or more of the registered committers (wraps last exception captured)
-
clean
Cleans all registered committers.- Throws:
CommitterServiceException- wrapper around operation failure one or more of the registered committers (wraps last exception captured)
-
toString
-
builder
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getCommitters
-
getEventManager
-
getUpsertRequestBuilder
-
getDeleteRequestBuilder
-