Class DataStreamAlias

org.elasticsearch.cluster.AbstractDiffable<DataStreamAlias>
org.elasticsearch.cluster.metadata.DataStreamAlias
All Implemented Interfaces:
Diffable<DataStreamAlias>, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class DataStreamAlias extends AbstractDiffable<DataStreamAlias> implements org.elasticsearch.common.xcontent.ToXContentFragment
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static org.elasticsearch.common.xcontent.ParseField
     
    static org.elasticsearch.common.xcontent.ParseField
     

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     name, <> dataStreams,  writeDataStream)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
     dataStream,  isWriteDataStream)
    Returns a new DataStreamAlias instance with the provided data stream name added to it as a new member.
    boolean
     o)
     
    fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
     
    <>
    Returns the data streams that are referenced
    Returns the name of this data stream alias.
    Returns the write data stream this data stream alias is referring to.
    int
     
    <> filter)
    Returns a new DataStreamAlias instance that contains a new intersection of data streams from this instance and the provided filter.
    Returns a new DataStreamAlias instance containing data streams referenced in this instance and the other instance.
     
     dataStream)
    Returns a DataStreamAlias instance based on this instance but with the specified data stream no longer referenced.
     renamePattern,  renameReplacement)
    Returns a new instance with potentially renamed data stream names and write data stream name.
    org.elasticsearch.common.xcontent.XContentBuilder
    toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
    void
    Write this into the StreamOutput.

    Methods inherited from class org.elasticsearch.cluster.AbstractDiffable

    diff, readDiffFrom

    Methods inherited from class java.lang.

    , , , , , , , ,

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Field Details

    • DATA_STREAMS_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField DATA_STREAMS_FIELD
    • WRITE_DATA_STREAM_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField WRITE_DATA_STREAM_FIELD
  • Constructor Details

    • DataStreamAlias

      public DataStreamAlias( name, <> dataStreams,  writeDataStream)
    • DataStreamAlias

      public DataStreamAlias(StreamInput in) throws
      Throws:
  • Method Details

    • getName

      public  getName()
      Returns the name of this data stream alias.
    • getDataStreams

      public <> getDataStreams()
      Returns the data streams that are referenced
    • getWriteDataStream

      public  getWriteDataStream()
      Returns the write data stream this data stream alias is referring to. Write requests targeting this instance will resolve the write index of the write data stream this alias is referring to. Note that the write data stream is also included in getDataStreams().
    • addDataStream

      public  dataStream,  isWriteDataStream)
      Returns a new DataStreamAlias instance with the provided data stream name added to it as a new member. If the provided isWriteDataStream is set to true then the provided data stream is also set as write data stream. If the provided isWriteDataStream is set to false and the provided data stream is also the write data stream of this instance then the returned data stream alias instance's write data stream is unset. The same instance is returned if the attempted addition of the provided data stream didn't change this instance.
    • removeDataStream

      public  dataStream)
      Returns a DataStreamAlias instance based on this instance but with the specified data stream no longer referenced. Returns null if because of the removal of the provided data stream name a new instance wouldn't reference to any data stream. The same instance is returned if the attempted removal of the provided data stream didn't change this instance.
    • intersect

      public <> filter)
      Returns a new DataStreamAlias instance that contains a new intersection of data streams from this instance and the provided filter. The write data stream gets set to null in the returned instance if the write data stream no longer appears in the intersection.
    • merge

      public DataStreamAlias merge(DataStreamAlias other)
      Returns a new DataStreamAlias instance containing data streams referenced in this instance and the other instance. If this instance doesn't have a write data stream then the write index of the other data stream becomes the write data stream of the returned instance.
    • renameDataStreams

      public  renamePattern,  renameReplacement)
      Returns a new instance with potentially renamed data stream names and write data stream name. If a data stream name matches with the provided rename pattern then it is renamed according to the provided rename replacement.
    • readDiffFrom

      public static Diff<DataStreamAlias> readDiffFrom(StreamInput in) throws
      Throws:
    • fromXContent

      public static DataStreamAlias fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws
      Throws:
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
    • equals

      public boolean equals( o)
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class