java.lang.Object
java.lang.Record
org.elasticsearch.script.ScriptContextStats
- Record Components:
context
- Context name.compilations
- Total number of compilations.compilationsHistory
- Historical information of the compilations of scripts in timeseries format.cacheEvictions
- Total of evictions.cacheEvictionsHistory
- Historical information of the evictions of scripts in timeseries format.compilationLimitTriggered
- Total times that a limit of compilations that have reached the limit.
- All Implemented Interfaces:
Comparable<ScriptContextStats>
,Writeable
,ToXContent
,ToXContentFragment
public record ScriptContextStats(String context, long compilations, TimeSeries compilationsHistory, long cacheEvictions, TimeSeries cacheEvictionsHistory, long compilationLimitTriggered)
extends Record
implements Writeable, ToXContentFragment, Comparable<ScriptContextStats>
Record object that holds stats information for the different script contexts in a node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested 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.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionScriptContextStats
(String context, long compilations, TimeSeries compilationsHistory, long cacheEvictions, TimeSeries cacheEvictionsHistory, long compilationLimitTriggered) Creates an instance of aScriptContextStats
record class.ScriptContextStats
(String context, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of thecacheEvictions
record component.Returns the value of thecacheEvictionsHistory
record component.int
long
Returns the value of thecompilationLimitTriggered
record component.long
Returns the value of thecompilations
record component.Returns the value of thecompilationsHistory
record component.context()
Returns the value of thecontext
record component.final boolean
Indicates whether some other object is "equal to" this one.long
long
long
final int
hashCode()
Returns a hash code value for this object.static ScriptContextStats
merge
(ScriptContextStats first, ScriptContextStats second) static ScriptContextStats
read
(StreamInput in) final String
toString()
Returns a string representation of this record class.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
ScriptContextStats
public ScriptContextStats(String context, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) -
ScriptContextStats
public ScriptContextStats(String context, long compilations, TimeSeries compilationsHistory, long cacheEvictions, TimeSeries cacheEvictionsHistory, long compilationLimitTriggered) Creates an instance of aScriptContextStats
record class.- Parameters:
context
- the value for thecontext
record componentcompilations
- the value for thecompilations
record componentcompilationsHistory
- the value for thecompilationsHistory
record componentcacheEvictions
- the value for thecacheEvictions
record componentcacheEvictionsHistory
- the value for thecacheEvictionsHistory
record componentcompilationLimitTriggered
- the value for thecompilationLimitTriggered
record component
-
-
Method Details
-
read
- Throws:
IOException
-
merge
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getContext
-
getCompilations
public long getCompilations() -
getCompilationsHistory
-
getCacheEvictions
public long getCacheEvictions() -
getCacheEvictionsHistory
-
getCompilationLimitTriggered
public long getCompilationLimitTriggered() -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ScriptContextStats>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
context
Returns the value of thecontext
record component.- Returns:
- the value of the
context
record component
-
compilations
public long compilations()Returns the value of thecompilations
record component.- Returns:
- the value of the
compilations
record component
-
compilationsHistory
Returns the value of thecompilationsHistory
record component.- Returns:
- the value of the
compilationsHistory
record component
-
cacheEvictions
public long cacheEvictions()Returns the value of thecacheEvictions
record component.- Returns:
- the value of the
cacheEvictions
record component
-
cacheEvictionsHistory
Returns the value of thecacheEvictionsHistory
record component.- Returns:
- the value of the
cacheEvictionsHistory
record component
-
compilationLimitTriggered
public long compilationLimitTriggered()Returns the value of thecompilationLimitTriggered
record component.- Returns:
- the value of the
compilationLimitTriggered
record component
-