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:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable
public class PreallocatedCircuitBreakerService extends CircuitBreakerService implements 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
Constructors Constructor Description PreallocatedCircuitBreakerService(CircuitBreakerService next, java.lang.String breakerToPreallocate, long bytesToPreallocate, java.lang.String label) -
Method Summary
Modifier and Type Method Description voidclose()CircuitBreakergetBreaker(java.lang.String name)AllCircuitBreakerStatsstats()CircuitBreakerStatsstats(java.lang.String name)Methods inherited from class org.elasticsearch.indices.breaker.CircuitBreakerService
doClose, doStart, doStopMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PreallocatedCircuitBreakerService
public PreallocatedCircuitBreakerService(CircuitBreakerService next, java.lang.String breakerToPreallocate, long bytesToPreallocate, java.lang.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 interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceReleasable- Overrides:
closein classAbstractLifecycleComponent
-