java.lang.Object
org.elasticsearch.ingest.PipelineConfiguration
- All Implemented Interfaces:
Diffable<PipelineConfiguration>,SimpleDiffable<PipelineConfiguration>,Writeable,ToXContent,ToXContentObject
public final class PipelineConfiguration
extends Object
implements SimpleDiffable<PipelineConfiguration>, ToXContentObject
Encapsulates a pipeline's id and configuration as a loosely typed map -- see
Pipeline for the
parsed and processed object(s) that a pipeline configuration will become. This class is used for things
like keeping track of pipelines in the cluster state (where a pipeline is 'just some json') whereas the
Pipeline class is used in the actual processing of ingest documents through pipelines in the
IngestService.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionPipelineConfiguration(String id, Map<String, Object> config) PipelineConfiguration(String id, BytesReference config, XContentType xContentType) A convenience constructor that parses some bytes as a map representing a pipeline's config and then delegates to the conventionalPipelineConfiguration(String, Map)constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetConfig(boolean unmodifiable) getId()static ContextParser<Void, PipelineConfiguration> inthashCode()static Diff<PipelineConfiguration> static PipelineConfigurationreadFrom(StreamInput in) toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
PipelineConfiguration
-
PipelineConfiguration
A convenience constructor that parses some bytes as a map representing a pipeline's config and then delegates to the conventionalPipelineConfiguration(String, Map)constructor.- Parameters:
id- the id of the pipelineconfig- a parse-able bytes reference that will return a pipeline configurationxContentType- the content-type to use while parsing the pipeline configuration
-
-
Method Details
-
getParser
-
getId
-
getConfig
- Returns:
- a reference to the unmodifiable configuration map for this pipeline
-
getConfig
- Parameters:
unmodifiable- whether the returned map should be unmodifiable or not- Returns:
- a reference to the unmodifiable config map (if unmodifiable is true) or a reference to a freshly-created mutable deep copy of the config map (if unmodifiable is false)
-
getVersion
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
readFrom
- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
toString
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-