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
ConstructorDescriptionPreallocatedCircuitBreakerService(CircuitBreakerService next, String breakerToPreallocate, long bytesToPreallocate, String label)
-
Method Summary
Methods inherited from class org.elasticsearch.indices.breaker.CircuitBreakerService
doClose, doStart, doStop
Methods 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:
getBreaker
in classCircuitBreakerService
- Returns:
- the breaker that can be used to register estimates against
-
stats
- Specified by:
stats
in classCircuitBreakerService
- Returns:
- stats about all breakers
-
stats
- Specified by:
stats
in classCircuitBreakerService
- Returns:
- stats about a specific breaker
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.elasticsearch.core.Releasable
- Overrides:
close
in classAbstractLifecycleComponent
-