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.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.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionScriptContextStats(String context, long compilations, TimeSeries compilationsHistory, long cacheEvictions, TimeSeries cacheEvictionsHistory, long compilationLimitTriggered) Creates an instance of aScriptContextStatsrecord class.ScriptContextStats(String context, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecacheEvictionsrecord component.Returns the value of thecacheEvictionsHistoryrecord component.intlongReturns the value of thecompilationLimitTriggeredrecord component.longReturns the value of thecompilationsrecord component.Returns the value of thecompilationsHistoryrecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.longlonglongfinal inthashCode()Returns a hash code value for this object.static ScriptContextStatsmerge(ScriptContextStats first, ScriptContextStats second) static ScriptContextStatsread(StreamInput in) final StringtoString()Returns a string representation of this record class.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.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 aScriptContextStatsrecord class.- Parameters:
context- the value for thecontextrecord componentcompilations- the value for thecompilationsrecord componentcompilationsHistory- the value for thecompilationsHistoryrecord componentcacheEvictions- the value for thecacheEvictionsrecord componentcacheEvictionsHistory- the value for thecacheEvictionsHistoryrecord componentcompilationLimitTriggered- the value for thecompilationLimitTriggeredrecord component
-
-
Method Details
-
read
- Throws:
IOException
-
merge
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin 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:
toXContentin interfaceToXContent- Throws:
IOException
-
compareTo
- Specified by:
compareToin 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 thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
compilations
public long compilations()Returns the value of thecompilationsrecord component.- Returns:
- the value of the
compilationsrecord component
-
compilationsHistory
Returns the value of thecompilationsHistoryrecord component.- Returns:
- the value of the
compilationsHistoryrecord component
-
cacheEvictions
public long cacheEvictions()Returns the value of thecacheEvictionsrecord component.- Returns:
- the value of the
cacheEvictionsrecord component
-
cacheEvictionsHistory
Returns the value of thecacheEvictionsHistoryrecord component.- Returns:
- the value of the
cacheEvictionsHistoryrecord component
-
compilationLimitTriggered
public long compilationLimitTriggered()Returns the value of thecompilationLimitTriggeredrecord component.- Returns:
- the value of the
compilationLimitTriggeredrecord component
-