public class ChildMemoryCircuitBreaker extends Object implements CircuitBreaker
CircuitBreaker.TypeFIELDDATA, PARENT, REQUEST| コンストラクタと説明 |
|---|
ChildMemoryCircuitBreaker(BreakerSettings settings,
ChildMemoryCircuitBreaker oldBreaker,
ESLogger logger,
HierarchyCircuitBreakerService parent,
String name)
Create a circuit breaker that will break if the number of estimated
bytes grows above the limit.
|
ChildMemoryCircuitBreaker(BreakerSettings settings,
ESLogger logger,
HierarchyCircuitBreakerService parent,
String name)
Create a circuit breaker that will break if the number of estimated
bytes grows above the limit.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
double |
addEstimateBytesAndMaybeBreak(long bytes,
String label)
Add a number of bytes, tripping the circuit breaker if the aggregated
estimates are above the limit.
|
long |
addWithoutBreaking(long bytes)
Add an exact number of bytes, not checking for tripping the
circuit breaker.
|
void |
circuitBreak(String fieldName,
long bytesNeeded)
Method used to trip the breaker, delegates to the parent to determine
whether to trip the breaker or not
|
long |
getLimit() |
String |
getName() |
double |
getOverhead() |
long |
getTrippedCount() |
long |
getUsed() |
public ChildMemoryCircuitBreaker(BreakerSettings settings, ESLogger logger, HierarchyCircuitBreakerService parent, String name)
settings - settings to configure this breakerparent - parent circuit breaker service to delegate tripped breakers toname - the name of the breakerpublic ChildMemoryCircuitBreaker(BreakerSettings settings, ChildMemoryCircuitBreaker oldBreaker, ESLogger logger, HierarchyCircuitBreakerService parent, String name)
settings - settings to configure this breakerparent - parent circuit breaker service to delegate tripped breakers toname - the name of the breakeroldBreaker - the previous circuit breaker to inherit the used value from (starting offset)public void circuitBreak(String fieldName, long bytesNeeded)
circuitBreak インタフェース内 CircuitBreakerfieldName - name of the field responsible for tripping the breakerbytesNeeded - bytes asked for but unable to be allocatedpublic double addEstimateBytesAndMaybeBreak(long bytes,
String label)
throws CircuitBreakingException
addEstimateBytesAndMaybeBreak インタフェース内 CircuitBreakerbytes - number of bytes to add to the breakerlabel - string label describing the bytes being addedCircuitBreakingExceptionpublic long addWithoutBreaking(long bytes)
addWithoutBreaking インタフェース内 CircuitBreakerbytes - number of bytes to add to the breakerpublic long getUsed()
getUsed インタフェース内 CircuitBreakerpublic long getLimit()
getLimit インタフェース内 CircuitBreakerpublic double getOverhead()
getOverhead インタフェース内 CircuitBreakerpublic long getTrippedCount()
getTrippedCount インタフェース内 CircuitBreakerpublic String getName()
getName インタフェース内 CircuitBreakerCopyright © 2009–2016. All rights reserved.