Package org.elasticsearch.common.breaker
Class PreallocatedCircuitBreakerService
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.indices.breaker.CircuitBreakerService
org.elasticsearch.common.breaker.PreallocatedCircuitBreakerService
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,org.elasticsearch.core.Releasable
public class PreallocatedCircuitBreakerService
extends CircuitBreakerService
implements org.elasticsearch.core.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.-
Field Summary
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle -
Constructor Summary
ConstructorsConstructorDescriptionPreallocatedCircuitBreakerService(CircuitBreakerService next, String breakerToPreallocate, long bytesToPreallocate, String label) -
Method Summary
Methods inherited from class org.elasticsearch.indices.breaker.CircuitBreakerService
doClose, doStart, doStopMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
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 interfaceorg.elasticsearch.core.Releasable- Overrides:
closein classAbstractLifecycleComponent
-