Module org.elasticsearch.server
Package org.elasticsearch.common.breaker
Class PreallocatedCircuitBreakerService
java.lang.Object
org.elasticsearch.indices.breaker.CircuitBreakerService
org.elasticsearch.common.breaker.PreallocatedCircuitBreakerService
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
CircuitBreakerService that preallocates some bytes on construction.
Use this when you know you'll be allocating many small things on a
CircuitBreaker quickly and there is a definite "finished" time, like
when aggregations are built.-
Constructor Summary
ConstructorsConstructorDescriptionPreallocatedCircuitBreakerService(CircuitBreakerService next, String breakerToPreallocate, long bytesToPreallocate, String label) -
Method Summary
-
Constructor Details
-
PreallocatedCircuitBreakerService
public PreallocatedCircuitBreakerService(CircuitBreakerService next, String breakerToPreallocate, long bytesToPreallocate, String label)
-
-
Method Details
-
getBreaker
- Specified by:
getBreakerin classCircuitBreakerService- Returns:
- the breaker that can be used to register estimates against
-
stats
- Specified by:
statsin classCircuitBreakerService- Returns:
- stats about all breakers
-
stats
- Specified by:
statsin classCircuitBreakerService- Returns:
- stats about a specific breaker
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-