Class CircuitBreakerStats
java.lang.Object
org.opensearch.core.indices.breaker.CircuitBreakerStats
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
@PublicApi(since="1.0.0")
public class CircuitBreakerStats
extends Object
implements Writeable, ToXContentObject
Class encapsulating stats about the
CircuitBreaker- Opensearch.api:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.WriteableRegistry, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionCircuitBreakerStats(String name, long limit, long estimated, double overhead, long trippedCount) Constructs new instanceConstructs new instance from theStreamInput -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the estimated size in byte of the breakerlonggetLimit()Returns the limit size in byte of the circuit breakergetName()Returns the name of the circuit breakerdoubleReturns the overhead of the breakerlongReturns the number of times the breaker has been trippedtoString()Returns a String representation of this CircuitBreakerStatstoXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Writes this instance into aStreamOutputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
CircuitBreakerStats
public CircuitBreakerStats(String name, long limit, long estimated, double overhead, long trippedCount) Constructs new instance- Parameters:
name- The name of the circuit breakerlimit- The limit size in byte of the circuit breakerestimated- The estimated size in byte of the breakeroverhead- The overhead of the breakertrippedCount- The number of times the breaker has been tripped- See Also:
-
CircuitBreakerStats
Constructs new instance from theStreamInput- Parameters:
in- The StreamInput- Throws:
IOException- if an error occurs while reading from the StreamInput- See Also:
-
-
Method Details
-
writeTo
Writes this instance into aStreamOutput- Specified by:
writeToin interfaceWriteable- Parameters:
out- The StreamOutput- Throws:
IOException- if an error occurs while writing to the StreamOutput- See Also:
-
getName
Returns the name of the circuit breaker- Returns:
- The name of the circuit breaker
-
getLimit
public long getLimit()Returns the limit size in byte of the circuit breaker- Returns:
- The limit size in byte of the circuit breaker
-
getEstimated
public long getEstimated()Returns the estimated size in byte of the breaker- Returns:
- The estimated size in byte of the breaker
-
getTrippedCount
public long getTrippedCount()Returns the number of times the breaker has been tripped- Returns:
- The number of times the breaker has been tripped
-
getOverhead
public double getOverhead()Returns the overhead of the breaker- Returns:
- The overhead of the breaker
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
toString
Returns a String representation of this CircuitBreakerStats
-