com.groupbyinc.flux.common.breaker.MemoryCircuitBreaker.class Maven / Gradle / Ivy
???? 4 ? 7com/groupbyinc/flux/common/breaker/MemoryCircuitBreaker java/lang/Object 1com/groupbyinc/flux/common/breaker/CircuitBreaker MemoryCircuitBreaker.java memoryBytesLimit J overheadConstant D used (Ljava/util/concurrent/atomic/AtomicLong; trippedCount logger !Lorg/apache/logging/log4j/Logger; $assertionsDisabled Z T(Lcom/groupbyinc/flux/common/unit/ByteSizeValue;DLorg/apache/logging/log4j/Logger;)V ?(Lcom/groupbyinc/flux/common/unit/ByteSizeValue;DLcom/groupbyinc/flux/common/breaker/MemoryCircuitBreaker;Lorg/apache/logging/log4j/Logger;)V
this 9Lcom/groupbyinc/flux/common/breaker/MemoryCircuitBreaker; limit /Lcom/groupbyinc/flux/common/unit/ByteSizeValue; ()V
-com/groupbyinc/flux/common/unit/ByteSizeValue getBytes ()J ! "
# %
' &java/util/concurrent/atomic/AtomicLong ) (J)V +
* ,
.
0 org/apache/logging/log4j/Logger 2 4 isTraceEnabled ()Z 6 7 3 8 YCreating MemoryCircuitBreaker with a limit of {} bytes ({}) and a overhead constant of {} : java/lang/Long < valueOf (J)Ljava/lang/Long; > ?
= @ java/lang/Double B (D)Ljava/lang/Double; > D
C E trace K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V G H 3 I
oldBreaker circuitBreak (Ljava/lang/String;J)V ;com/groupbyinc/flux/common/breaker/CircuitBreakingException N incrementAndGet P "
* Q java/lang/StringBuilder S
T [ V append -(Ljava/lang/String;)Ljava/lang/StringBuilder; X Y
T Z getName ()Ljava/lang/String; \ ]
^ "] Data too large, data for field [ ` ] would be [ b (J)Ljava/lang/StringBuilder; X d
T e / g
, -(Ljava/lang/Object;)Ljava/lang/StringBuilder; X j
T k &], which is larger than the limit of [ m ] o toString q ]
T r {} t debug '(Ljava/lang/String;Ljava/lang/Object;)V v w 3 x (Ljava/lang/String;JJ)V z
O { fieldName Ljava/lang/String; bytesNeeded message addEstimateBytesAndMaybeBreak (JLjava/lang/String;)D L M
????????? addAndGet (J)J ? ?
* ?