All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.common.util.concurrent.QueueResizingEsThreadPoolExecutor.class Maven / Gradle / Ivy

????4?Lcom/groupbyinc/flux/common/util/concurrent/QueueResizingEsThreadPoolExecutor?com/groupbyinc/flux/common/util/concurrent/EsThreadPoolExecutor&QueueResizingEsThreadPoolExecutor.java%java/lang/invoke/MethodHandles$Lookupjava/lang/invoke/MethodHandlesLookup
EWMA_ALPHADlogger8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;QUEUE_ADJUSTMENT_AMOUNTI2runnableWrapperLjava/util/function/Function;GLjava/util/function/Function;	workQueueCLcom/groupbyinc/flux/common/util/concurrent/ResizableBlockingQueue;YLcom/groupbyinc/flux/common/util/concurrent/ResizableBlockingQueue;
tasksPerFrameminQueueSizemaxQueueSizetargetedResponseTimeNanosJ
executionEWMA?Lcom/groupbyinc/flux/common/ExponentiallyWeightedMovingAverage;totalTaskNanos(Ljava/util/concurrent/atomic/AtomicLong;	taskCount+Ljava/util/concurrent/atomic/AtomicInteger;startNs$assertionsDisabledZi(Ljava/lang/String;IIJLjava/util/concurrent/TimeUnit;Lcom/groupbyinc/flux/common/util/concurrent/ResizableBlockingQueue;IILjava/util/function/Function;ILcom/groupbyinc/flux/common/unit/TimeValue;Ljava/util/concurrent/ThreadFactory;Lcom/groupbyinc/flux/common/util/concurrent/XRejectedExecutionHandler;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)V?(Ljava/lang/String;IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Lcom/groupbyinc/flux/common/util/concurrent/XRejectedExecutionHandler;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)V&(
)&java/util/concurrent/atomic/AtomicLong+(J)V&-
,. 	0)java/util/concurrent/atomic/AtomicInteger2(I)V&4
35!"	7	9	;	=java/lang/System?nanoTime()JAB
@C#	E	G	I)com/groupbyinc/flux/common/unit/TimeValueKgetNanosMB
LN	P=com/groupbyinc/flux/common/ExponentiallyWeightedMovingAverageR	T(DD)V&V
SW	Y
	[Pthread pool [{}] will adjust queue by [{}] when determining automatic queue size]java/lang/Integer_valueOf(I)Ljava/lang/Integer;ab
`c6com/groupbyinc/flux/common/apache/logging/log4j/Loggeredebug9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)VghfithisNLcom/groupbyinc/flux/common/util/concurrent/QueueResizingEsThreadPoolExecutor;nameLjava/lang/String;corePoolSizemaximumPoolSize
keepAliveTimeunitLjava/util/concurrent/TimeUnit;targetedResponseTime+Lcom/groupbyinc/flux/common/unit/TimeValue;
threadFactory$Ljava/util/concurrent/ThreadFactory;handlerFLcom/groupbyinc/flux/common/util/concurrent/XRejectedExecutionHandler;
contextHolder:Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;	doExecute(Ljava/lang/Runnable;)Vjava/util/function/Function~apply&(Ljava/lang/Object;)Ljava/lang/Object;???java/lang/Runnable?|}
?commandLjava/lang/Runnable;calculateLambda(IJ)D$%	?java/lang/AssertionError?java/lang/StringBuilder?()V&?
??/cannot calculate for instantaneous tasks, got: ?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??(J)Ljava/lang/StringBuilder;??
??toString()Ljava/lang/String;??
??(Ljava/lang/Object;)V&?
??$cannot calculate for no tasks, got: ?(I)Ljava/lang/StringBuilder;??
??totalNumberOfTaskstotalFrameTaskNanos
calculateL(DJ)I+cannot calculate for instantaneous requests?java/lang/Math?
toIntExact(J)I??
??lambdagetCurrentCapacity()IAcom/groupbyinc/flux/common/util/concurrent/ResizableBlockingQueue?capacity??
??getTaskExecutionEWMA()D
getAverage??
S?getCurrentQueueSizesize??
??afterExecute,(Ljava/lang/Runnable;Ljava/lang/Throwable;)Vjava/lang/ArithmeticException???
?8com/groupbyinc/flux/common/util/concurrent/TimedRunnable?%expected only TimedRunnables in queue?
getTotalNanos?B
??	addAndGet(J)J??
,?getTotalExecutionNanos?B
??=expected task to always take longer than 0 nanoseconds, got: ?addValue(D)V??
S?incrementAndGet??
3???
???
?isDebugEnabled()Z??f??[{}]: there were [{}] tasks in [{}], avg task time [{}], EWMA task execution [{}], [{} tasks/s], optimal queue is [{}], current capacity [{}]?mn	?timeValueNanos.(J)Lcom/groupbyinc/flux/common/unit/TimeValue;??
L?java/util/Locale?ROOTLjava/util/Locale;??	??%.2f?java/lang/Object?timeValueSeconds??
L?nanosB
Ljava/lang/Double(D)Ljava/lang/Double;a
java/lang/String	formatK(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;


?(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Vgfjava/lang/ThrowableadjustCapacity(IIII)I
?Hadjusted [{}] queue size by [{}], old capacity: [{}], new capacity: [{}]](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Vgf(I)I?
3%tasks should never be negative, got:  ][{}]: too many incoming tasks while queue size adjustment occurs, resetting measurements to 0"'(Ljava/lang/String;Ljava/lang/Object;)Vg$f%	getAndSet'?
,('
3*"java/lang/invoke/LambdaMetafactory,metafactory?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;./
-01()Ljava/lang/Object;3lambda$afterExecute$0(JJ)Ljava/lang/Object;56
78geto(Lcom/groupbyinc/flux/common/util/concurrent/QueueResizingEsThreadPoolExecutor;JJ)Ljava/util/function/Supplier;:;<warn*(Ljava/lang/Object;Ljava/lang/Throwable;)V>?f@avgTaskTimedesiredQueueSizeoldCapacitynewCapacitytaskseLjava/lang/ArithmeticException;	endTimeNstotalRuntimertLjava/lang/Throwable;	taskNanos
totalNanostaskExecutionNanosgetClass()Ljava/lang/Class;QR
?Sjava/lang/ClassU
getSimpleNameW?
VX(C)Ljava/lang/StringBuilder;?Z
?[, ]getQueue&()Ljava/util/concurrent/BlockingQueue;_`
aqueue capacity = c??
emin queue capacity = gmax queue capacity = i
frame size = ktargeted response rate = m-(Ljava/lang/Object;)Ljava/lang/StringBuilder;?o
?ptask execution EWMA = radjustment amount = t
?bLjava/lang/StringBuilder;queueLcom/groupbyinc/flux/common/apache/logging/log4j/message/ParameterizedMessagez|failed to calculate optimal queue size for [{}] thread pool, total frame time [{}ns], tasks [{}], task execution time [{}ns]|java/lang/Long~(J)Ljava/lang/Long;a?
?((Ljava/lang/String;[Ljava/lang/Object;)V&?
{?desiredAssertionStatus??
V???3333332com/groupbyinc/flux/common/logging/ESLoggerFactory?	getLoggerK(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;??
??
ConstantValue	SignatureCodeLocalVariableTableLocalVariableTypeTableLineNumberTable?(Ljava/lang/String;IIJLjava/util/concurrent/TimeUnit;Lcom/groupbyinc/flux/common/util/concurrent/ResizableBlockingQueue;IILjava/util/function/Function;ILcom/groupbyinc/flux/common/unit/TimeValue;Ljava/util/concurrent/ThreadFactory;Lcom/groupbyinc/flux/common/util/concurrent/XRejectedExecutionHandler;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)V
StackMapTableBootstrapMethods
SourceFileInnerClasses1	
??? !"#$%&'??}*+
?**?,Y	?/?1*?3Y?6?8*
?:*?<*?>*?D?F*?H*	?J*?O?Q*?SY?U*?Q??X?Z?\^+2?d?j???}kl}mn}o}p}q}rs}}}	}
}}tu}vw
}xy}z{?}}
?>I?@+K1L7M=NDOJPPQYTlUtVwU|W??|}?J**?:+????????kl???
_`????R???$	????Y??Y???????????????"???Y??Y??????????????o??R?R??j'kLr?'$???`??? 	??
??Y????& ?k???????
}????2*??m?D7		*?Fe7*	?F*?>??9

*?Q??6*??m7?\?*??*?>?d????*?Z???????Y
???k?S??d?d?
*?<2*?H*?J?6?8?\???-?\*???2?θd?d?d?*?8*?>t?6???%? ??Y??Y??!?????????*?>?.?\#*??&*?1
?)X*?8?+W*?D?F?*?1u??X?:?\*?=?A*?8*?>t?6???%? ??Y??Y??!?????????*?>?.?\#*??&*?1
?)X*?8?+W*?D?F?*?1u??X?}:*?8*?>t?6???%? ??Y??Y??!?????????*?>?.?\#*??&*?1
?)X*?8?+W*?D?F?*?1u??X???c???ci??iiki???QB???
??C??D'<EqgF?GH?gFygF~eI	?\J?kl?K??LM%?N/?O8?P??>???%?/?8?a?k?y?~??????????????????????????
?
??"?'?9?Q?V?^?c?q???????????????????????'?0???H?Q?[?f?i?y??????????????????%?C????<?f

??f

???5?3?
?B??K?3?
?B?7?3?
?????L޻?Y??L+*?T?Y??[?\W+*???^??W*?b??M+d??*?f??^??W+h??*?H??^??W+j??*?J??^??W+l??*?>??^??W+n??*?Q??q^??W+s??*?Z???q^??W+u??2??^??W+*?v??]?\W+???? ?kl?wx0?y?6
???(?0?E?Z?o????????56?t.?{Y}??Y*??SY??SY*?>?dSY!??S???? .kl.J.O???-????R????????U???\??-0232?@?2494??
	





© 2015 - 2025 Weber Informatics LLC | Privacy Policy