Package com.norconex.committer.core.impl
Class LogCommitter
java.lang.Object
com.norconex.committer.core.AbstractCommitter<LogCommitterConfig>
com.norconex.committer.core.impl.LogCommitter
- All Implemented Interfaces:
Committer,Configurable<LogCommitterConfig>,AutoCloseable
WARNING: Not intended for production use.
A Committer that logs all data associated with every document, added or removed, to the application logs, or the console (STDOUT/STDERR). Default uses application logger with INFO log level.
This Committer can be useful for troubleshooting. Given how much information this could represent, it is recommended you do not use in a production environment. At a minimum, if you are logging to file, make sure to rotate/clean the logs regularly.
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected 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) booleanlonglonggetWatch()inthashCode()voidsetAddCount(long addCount) voidsetRemoveCount(long removeCount) toString()Methods inherited from class com.norconex.committer.core.AbstractCommitter
accept, applyFieldMappings, clean, close, delete, fireDebug, fireDebug, fireError, fireError, fireInfo, fireInfo, getCommitterContext, init, upsert
-
Constructor Details
-
LogCommitter
public LogCommitter()
-
-
Method Details
-
getConfiguration
-
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<LogCommitterConfig>- Throws:
CommitterException- error initializing
-
doUpsert
- Specified by:
doUpsertin classAbstractCommitter<LogCommitterConfig>- Throws:
CommitterException
-
doDelete
- Specified by:
doDeletein classAbstractCommitter<LogCommitterConfig>- 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<LogCommitterConfig>- Throws:
CommitterException- error closing committer
-
doClean
- Specified by:
doCleanin classAbstractCommitter<LogCommitterConfig>- Throws:
CommitterException
-
getAddCount
public long getAddCount() -
getRemoveCount
public long getRemoveCount() -
getWatch
-
setAddCount
public void setAddCount(long addCount) -
setRemoveCount
public void setRemoveCount(long removeCount) -
equals
- Overrides:
equalsin classAbstractCommitter<LogCommitterConfig>
-
canEqual
- Overrides:
canEqualin classAbstractCommitter<LogCommitterConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractCommitter<LogCommitterConfig>
-
toString
- Overrides:
toStringin classAbstractCommitter<LogCommitterConfig>
-