Module org.elasticsearch.server
Class SearchUsageStats
java.lang.Object
org.elasticsearch.action.admin.cluster.stats.SearchUsageStats
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentFragment
Holds a snapshot of the search usage statistics.
Used to hold the stats for a single node that's part of a
ClusterStatsNodeResponse
, as well as to
accumulate stats for the entire cluster and return them as part of the ClusterStatsResponse
.-
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_PARAMS
-
Constructor Summary
ConstructorDescriptionCreates a new empty stats instance, that will get additional stats added throughadd(SearchUsageStats)
Creates a new stats instance with the provided info. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(SearchUsageStats stats) Add the provided stats to the ones held by the current instance, effectively merging the twoboolean
long
int
hashCode()
toString()
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
-
SearchUsageStats
public SearchUsageStats()Creates a new empty stats instance, that will get additional stats added throughadd(SearchUsageStats)
-
SearchUsageStats
Creates a new stats instance with the provided info. The expectation is that when a new instance is created using this constructor, the provided stats are final and won't be modified further. -
SearchUsageStats
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
add
Add the provided stats to the ones held by the current instance, effectively merging the two -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
getQueryUsage
-
getSectionsUsage
-
getTotalSearchCount
public long getTotalSearchCount() -
equals
-
hashCode
public int hashCode() -
toString
-