Package org.opensearch.wlm
Class MutableQueryGroupFragment
java.lang.Object
org.opensearch.cluster.AbstractDiffable<MutableQueryGroupFragment>
org.opensearch.wlm.MutableQueryGroupFragment
- All Implemented Interfaces:
Diffable<MutableQueryGroupFragment>
,org.opensearch.core.common.io.stream.Writeable
@ExperimentalApi
public class MutableQueryGroupFragment
extends AbstractDiffable<MutableQueryGroupFragment>
Class to hold the fields that can be updated in a QueryGroup.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
This enum models the different QueryGroup resiliency modes SOFT - means that this query group can consume more than query group resource limits if node is not in duress ENFORCED - means that it will never breach the assigned limits and will cancel as soon as the limits are breached MONITOR - it will not cause any cancellation but just log the eligible task cancellationsNested 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
-
Constructor Summary
ConstructorDescriptionMutableQueryGroupFragment
(org.opensearch.core.common.io.stream.StreamInput in) MutableQueryGroupFragment
(MutableQueryGroupFragment.ResiliencyMode resiliencyMode, Map<ResourceType, Double> resourceLimits) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
void
parseField
(org.opensearch.core.xcontent.XContentParser parser, String field) void
setResiliencyMode
(MutableQueryGroupFragment.ResiliencyMode resiliencyMode) void
setResourceLimits
(Map<ResourceType, Double> resourceLimits) static boolean
shouldParse
(String field) static void
validateResourceLimits
(Map<ResourceType, Double> resourceLimits) void
writeField
(org.opensearch.core.xcontent.XContentBuilder builder, String field) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.cluster.AbstractDiffable
diff, readDiffFrom
-
Field Details
-
RESILIENCY_MODE_STRING
- See Also:
-
RESOURCE_LIMITS_STRING
- See Also:
-
acceptedFieldNames
-
-
Constructor Details
-
MutableQueryGroupFragment
public MutableQueryGroupFragment() -
MutableQueryGroupFragment
public MutableQueryGroupFragment(MutableQueryGroupFragment.ResiliencyMode resiliencyMode, Map<ResourceType, Double> resourceLimits) -
MutableQueryGroupFragment
public MutableQueryGroupFragment(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
-
Method Details
-
shouldParse
-
parseField
-
writeField
-
writeTo
- Throws:
IOException
-
validateResourceLimits
-
equals
-
hashCode
public int hashCode() -
getResiliencyMode
-
getResourceLimits
-
setResiliencyMode
-
setResourceLimits
-