Package com.norconex.committer.core3
Class CommitterContext
java.lang.Object
com.norconex.committer.core3.CommitterContext
Holds data defined outside a committer but useful or required for the
committer execution.
- Since:
- 3.0.0
- Author:
- Pascal Essiembre
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CommitterContext.Builderbuilder()Creates a builder forCommitterContext.booleanGets the event manager used to fire committer events.Gets the cached stream factory used by committers.Gets a unique working directory for a committer (if one is needed).inthashCode()toString()withEventManager(EventManager eventManager) Creates a copy of this context with a different event manager.withStreamFactory(CachedStreamFactory streamFactory) Creates a copy of this context with a different stream factory.withWorkdir(Path workDir) Creates a copy of this context with a different working directory.
-
Method Details
-
getEventManager
Gets the event manager used to fire committer events.- Returns:
- event manager
-
getWorkDir
Gets a unique working directory for a committer (if one is needed).- Returns:
- working directory (never
null)
-
getStreamFactory
Gets the cached stream factory used by committers.- Returns:
- cached stream factory
-
withEventManager
Creates a copy of this context with a different event manager.- Parameters:
eventManager- event manager to use- Returns:
- new context instance
-
withWorkdir
Creates a copy of this context with a different working directory.- Parameters:
workDir- working directory to use- Returns:
- new context instance
-
withStreamFactory
Creates a copy of this context with a different stream factory.- Parameters:
streamFactory- stream factory to use- Returns:
- new context instance
-
builder
Creates a builder forCommitterContext.- Returns:
- context builder
-
equals
-
hashCode
public int hashCode() -
toString
-