java.lang.Object
org.opensearch.cluster.routing.allocation.decider.Decision
org.opensearch.cluster.routing.allocation.decider.Decision.Multi
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentFragment
Enclosing class:
Decision

public static class Decision.Multi extends Decision implements org.opensearch.core.xcontent.ToXContentFragment
Simple class representing a list of decisions
Opensearch.internal:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opensearch.cluster.routing.allocation.decider.Decision

    Decision.Multi, Decision.Single, Decision.Type

    Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent

    org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params

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

    org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
  • Field Summary

    Fields inherited from class org.opensearch.cluster.routing.allocation.decider.Decision

    ALWAYS, NO, THROTTLE, YES

    Fields inherited from interface org.opensearch.core.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    add(Decision decision)
    Add a decision to this Decision.Multidecision instance
    boolean
    equals(Object object)
     
    Return the list of all decisions that make up this decision
    Get the explanation for this decision.
    int
     
    Get the description label for this decision.
     
    org.opensearch.core.xcontent.XContentBuilder
    toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params)
     
    Get the Decision.Type of this decision
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class org.opensearch.cluster.routing.allocation.decider.Decision

    readFrom, single

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment

    isFragment
  • Constructor Details

    • Multi

      public Multi()
  • Method Details

    • add

      public Decision.Multi add(Decision decision)
      Add a decision to this Decision.Multidecision instance
      Parameters:
      decision - Decision to add
      Returns:
      Decision.Multidecision instance with the given decision added
    • type

      public Decision.Type type()
      Description copied from class: Decision
      Get the Decision.Type of this decision
      Specified by:
      type in class Decision
      Returns:
      Decision.Type of this decision
    • label

      @Nullable public String label()
      Description copied from class: Decision
      Get the description label for this decision.
      Specified by:
      label in class Decision
    • getExplanation

      @Nullable public String getExplanation()
      Description copied from class: Decision
      Get the explanation for this decision.
      Specified by:
      getExplanation in class Decision
    • getDecisions

      public List<Decision> getDecisions()
      Description copied from class: Decision
      Return the list of all decisions that make up this decision
      Specified by:
      getDecisions in class Decision
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXContent

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

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException