Package com.norconex.committer.core.fs
Class AbstractFsCommitter<T,C extends BaseFsCommitterConfig>
java.lang.Object
com.norconex.committer.core.AbstractCommitter<C>
com.norconex.committer.core.fs.AbstractFsCommitter<T,C>
- Type Parameters:
T- type of file serializerC- type of configuration object
- All Implemented Interfaces:
Committer,Configurable<C>,AutoCloseable
- Direct Known Subclasses:
CsvFileCommitter,JsonFileCommitter,XmlFileCommitter
public abstract class AbstractFsCommitter<T,C extends BaseFsCommitterConfig>
extends AbstractCommitter<C>
Base class for Committers writing to the local file system.
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected abstract voidcloseDocWriter(T docWriter) protected abstract TcreateDocWriter(Writer writer) protected voiddoClean()protected voiddoClose()Subclasses can perform additional closing logic by overriding this method.protected voiddoDelete(DeleteRequest deleteRequest) protected voiddoInit()Subclasses can perform additional initialization by overriding this method.protected voiddoUpsert(UpsertRequest upsertRequest) booleanprotected abstract StringThe directly from configuration, else, from the committer context working directory.inthashCode()toString()protected abstract voidwriteDelete(T docWriter, DeleteRequest deleteRequest) protected abstract voidwriteUpsert(T docWriter, UpsertRequest upsertRequest) Methods inherited from class com.norconex.committer.core.AbstractCommitter
accept, applyFieldMappings, clean, close, delete, fireDebug, fireDebug, fireError, fireError, fireInfo, fireInfo, getCommitterContext, init, upsertMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.norconex.commons.lang.config.Configurable
getConfiguration
-
Constructor Details
-
AbstractFsCommitter
public AbstractFsCommitter()
-
-
Method Details
-
doInit
Description copied from class:AbstractCommitterSubclasses can perform additional initialization by overriding this method. Default implementation does nothing. TheCommitterContextwill be initialized when invokingAbstractCommitter.getCommitterContext()- Specified by:
doInitin classAbstractCommitter<C extends BaseFsCommitterConfig>- Throws:
CommitterException- error initializing
-
doUpsert
- Specified by:
doUpsertin classAbstractCommitter<C extends BaseFsCommitterConfig>- Throws:
CommitterException
-
doDelete
- Specified by:
doDeletein classAbstractCommitter<C extends BaseFsCommitterConfig>- Throws:
CommitterException
-
doClose
Description copied from class:AbstractCommitterSubclasses can perform additional closing logic by overriding this method. Default implementation does nothing.- Specified by:
doClosein classAbstractCommitter<C extends BaseFsCommitterConfig>- Throws:
CommitterException- error closing committer
-
doClean
- Specified by:
doCleanin classAbstractCommitter<C extends BaseFsCommitterConfig>- Throws:
CommitterException
-
getFileExtension
-
createDocWriter
- Throws:
IOException
-
writeUpsert
- Throws:
IOException
-
writeDelete
- Throws:
IOException
-
closeDocWriter
- Throws:
IOException
-
equals
- Overrides:
equalsin classAbstractCommitter<C extends BaseFsCommitterConfig>
-
canEqual
- Overrides:
canEqualin classAbstractCommitter<C extends BaseFsCommitterConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractCommitter<C extends BaseFsCommitterConfig>
-
toString
- Overrides:
toStringin classAbstractCommitter<C extends BaseFsCommitterConfig>
-
getResolvedDirectory
The directly from configuration, else, from the committer context working directory.
-