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

com.groupbyinc.flux.common.netty.handler.traffic.GlobalChannelTrafficShapingHandler.class Maven / Gradle / Ivy

There is a newer version: 59
Show newest version
????2WScom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandlerNcom/groupbyinc/flux/common/netty/handler/traffic/AbstractTrafficShapingHandler'GlobalChannelTrafficShapingHandler.javaBLcom/groupbyinc/flux/common/netty/channel/ChannelHandler$Sharable;Zcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$ToSendToSend^com/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel

PerChannelUcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$2
Ucom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$1@com/groupbyinc/flux/common/netty/channel/ChannelHandler$Sharable7com/groupbyinc/flux/common/netty/channel/ChannelHandlerSharablebcom/groupbyinc/flux/common/netty/handler/traffic/AbstractTrafficShapingHandler$ReopenReadTimerTaskReopenReadTimerTaskloggerGLcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger;
channelQueues$Ljava/util/concurrent/ConcurrentMap;?Ljava/util/concurrent/ConcurrentMap;
queuesSize(Ljava/util/concurrent/atomic/AtomicLong;cumulativeWrittenBytescumulativeReadBytesmaxGlobalWriteSizeJwriteChannelLimitreadChannelLimitDEFAULT_DEVIATIONF=???
MAX_DEVIATION>???DEFAULT_SLOWDOWNDEFAULT_ACCELERATION????maxDeviationaccelerationFactorslowDownFactorreadDeviationActiveZwriteDeviationActivecreateGlobalTrafficCounter2(Ljava/util/concurrent/ScheduledExecutorService;)VsetMaxDeviation(FFF)V67
8"java/lang/IllegalArgumentException:Executor must not be null<(Ljava/lang/String;)V>?
;@Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficCounterBGlobalChannelTCD
checkIntervalF#	G?(Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler;Ljava/util/concurrent/ScheduledExecutorService;Ljava/lang/String;J)V>I
CJsetTrafficCounterD(Lcom/groupbyinc/flux/common/netty/handler/traffic/TrafficCounter;)VLM
N?com/groupbyinc/flux/common/netty/handler/traffic/TrafficCounterPstart()VRS
QTthisULcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler;executor/Ljava/util/concurrent/ScheduledExecutorService;tcALcom/groupbyinc/flux/common/netty/handler/traffic/TrafficCounter;userDefinedWritabilityIndex()I8(Ljava/util/concurrent/ScheduledExecutorService;JJJJJJ)V(JJJJ)V>_
`@com/groupbyinc/flux/common/netty/util/internal/PlatformDependentbnewConcurrentHashMap&()Ljava/util/concurrent/ConcurrentMap;de
cf	h&java/util/concurrent/atomic/AtomicLongj>S
kl	n 	p!	r"#	v45
x$#	z%#	|writeGlobalLimitreadGlobalLimitmaxTime7(Ljava/util/concurrent/ScheduledExecutorService;JJJJJ)V(JJJ)V>?
?6(Ljava/util/concurrent/ScheduledExecutorService;JJJJ)V(JJ)V>?
?3(Ljava/util/concurrent/ScheduledExecutorService;J)V(J)V>?
?
l()F.'	?/'	?0'	?maxDeviation must be <= 0.4?slowDownFactor must be >= 0?accelerationFactor must be <= 0?computeDeviationCumulativeBytes???????"java/util/concurrent/ConcurrentMap?values()Ljava/util/Collection;????java/util/Collection?iterator()Ljava/util/Iterator;????java/util/Iterator?hasNext()Z????next()Ljava/lang/Object;????channelTrafficCounter?[	?()J ?
Q?!?
Q?size?]??12	?32	?set??
k?value
perChannel`Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;maxWrittenBytesmaxReadBytesminWrittenBytesminReadBytesmultipledoAccounting?S
??M
?countercomputeBalancedWait(FFJ)J
maxLocal	maxGlobalwaitratiogetMaxGlobalWriteSizesetMaxGlobalWriteSize#maxGlobalWriteSize must be positive?get??
k?configureChannelmilliSecondFromNano??
Q?resetAccounting??
Q?
newWriteLimitnewReadLimitnowgetWriteChannelLimitsetWriteChannelLimit
writeLimitgetReadChannelLimitsetReadChannelLimit	readLimitreleasetrafficCounter?[	?stop?S
Q?getOrSetPerChannel?(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;)Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;>com/groupbyinc/flux/common/netty/channel/ChannelHandlerContext?channel4()Lcom/groupbyinc/flux/common/netty/channel/Channel;?java/lang/ObjecthashCode]
java/lang/Integer	valueOf(I)Ljava/lang/Integer;


&(Ljava/lang/Object;)Ljava/lang/Object;??
ljava/util/ArrayDeque
l
messagesQueueLjava/util/ArrayDeque;	java/lang/StringBuilder
l	ChannelTCappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; 
!(I)Ljava/lang/StringBuilder;#
$toString()Ljava/lang/String;&'
(?(Lcom/groupbyinc/flux/common/netty/handler/traffic/AbstractTrafficShapingHandler;Ljava/util/concurrent/ScheduledExecutorService;Ljava/lang/String;J)V>*
Q+	queueSize-#	.lastReadTimestamp0#	1lastWriteTimestamp3#	4put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;67?80com/groupbyinc/flux/common/netty/channel/Channel:ctx@Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;2Lcom/groupbyinc/flux/common/netty/channel/Channel;keyLjava/lang/Integer;handlerAddedC(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;)Vjava/lang/ExceptionC??
EresetCumulativeTimeGS
QHAB
JhandlerRemovedremoveM?NisActiveP?;Q
?toSendLjava/lang/Object;TU	V
calculateSize(Ljava/lang/Object;)JXY
ZbytesRealWriteFlowControl\?
Q]	addAndGet(J)J_`
kapromise9Lcom/groupbyinc/flux/common/netty/channel/ChannelPromise;cd	ewrite?(Ljava/lang/Object;Lcom/groupbyinc/flux/common/netty/channel/ChannelPromise;)Lcom/groupbyinc/flux/common/netty/channel/ChannelFuture;gh?i/com/groupbyinc/flux/common/netty/buffer/ByteBufk??
lmclearoS
pjava/lang/ThrowablerreleaseWriteSuspendedtB
ureleaseReadSuspendedwB
xLB
z\Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$ToSend;channelReadU(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)VgetReadLimit?
??#	?readTimeToWait(JJJJ)J??
Q???
?checkWaitReadTimeE(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;JJ)J??
?config:()Lcom/groupbyinc/flux/common/netty/channel/ChannelConfig;??;?	?Ecom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger?isDebugEnabled????Read Suspend: ?(J)Ljava/lang/StringBuilder;?
?(C)Ljava/lang/StringBuilder;?
?6com/groupbyinc/flux/common/netty/channel/ChannelConfig?
isAutoRead????(Z)Ljava/lang/StringBuilder;?
?isHandlerActiveC(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;)Z??
?debug????setAutoRead;(Z)Lcom/groupbyinc/flux/common/netty/channel/ChannelConfig;????READ_SUSPENDED4Lcom/groupbyinc/flux/common/netty/util/AttributeKey;??	?attrg(Lcom/groupbyinc/flux/common/netty/util/AttributeKey;)Lcom/groupbyinc/flux/common/netty/util/Attribute;????java/lang/Boolean?(Z)Ljava/lang/Boolean;?
??/com/groupbyinc/flux/common/netty/util/Attribute?(Ljava/lang/Object;)V????REOPEN_TASK??	?????java/lang/Runnable?>B
?B()Lcom/groupbyinc/flux/common/netty/util/concurrent/EventExecutor;X???java/util/concurrent/TimeUnit?MILLISECONDSLjava/util/concurrent/TimeUnit;??	??>com/groupbyinc/flux/common/netty/util/concurrent/EventExecutor?schedulex(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Lcom/groupbyinc/flux/common/netty/util/concurrent/ScheduledFuture;????Suspend final status => ? will reopened at: ?informReadOperationD(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;J)V??
?fireChannelReadT(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;????maxLocalRead
maxGlobalReadGLcom/groupbyinc/flux/common/netty/util/Attribute;1Lcom/groupbyinc/flux/common/netty/util/Attribute;
reopenTaskLjava/lang/Runnable;8Lcom/groupbyinc/flux/common/netty/channel/ChannelConfig;
waitGlobalmsgmaximumCumulativeWrittenBytesmaximumCumulativeReadByteschannelTrafficCountersX(Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler;)V>?
??(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Lcom/groupbyinc/flux/common/netty/channel/ChannelPromise;)V
getWriteLimit??
?writeTimeToWait??
Q?7com/groupbyinc/flux/common/netty/channel/ChannelPromiseWrite suspend: submitWrite?(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;Ljava/lang/Object;JJJLcom/groupbyinc/flux/common/netty/channel/ChannelPromise;)V

maxLocalWritemaxGlobalWriteisEmpty
?
?(JLjava/lang/Object;JLcom/groupbyinc/flux/common/netty/channel/ChannelPromise;Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$1;)V>
addLast?
checkWriteSuspendE(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;JJ)V
setUserDefinedWritabilityD(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;Z)V
relativeTimeAction#	?(Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler;Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;J)V>
	newToSend
writedelaydelayglobalSizeExceeded	futureNowforSchedulesendAllValid?(Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;J)V	pollFirst)?
*?#	,addFirst.?
/flushB()Lcom/groupbyinc/flux/common/netty/channel/ChannelHandlerContext;12?3(I)V>5
6
( Write Channel Limit: 9 Read Channel Limit: ;
access$100'(
>x0x1x2x3Lcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLoggerFactoryEgetInstanceZ(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger;GH
FI	Signature
ConstantValueCodeLocalVariableTableLineNumberTable
StackMapTable
ExceptionsLocalVariableTypeTable[()Ljava/util/Collection;
SourceFileInnerClassesRuntimeVisibleAnnotations!K !@"#B$#B%#&'L()'L*+'L*,'L-B.'B/'B0'B12B32&45M?2*(*-?9+?
?;Y=?A??CY*+E*?H?KM*,?O,?U?N 2VW2XY(
Z[O?
???(?-?1?P\]M,?NVWO?>^M?	L* 
?a*?g?i*?kY?m?o*?kY?m?q*?kY?m?s*t?w*+?y*?{*?}?NRLVWLXYL~#L#L$#L%#LF#
L?#O*
?]bg(l3r:???E?K?>?M?J* 
??*?g?i*?kY?m?o*?kY?m?q*?kY?m?s*t?w*?{*?}*+?y?NHJVWJXYJ~#J#J$#J%#JF#
O*
?	]bg&l1r8?>?D?I?>?M?
H* ??*?g?i*?kY?m?o*?kY?m?q*?kY?m?s*t?w*?{*?}*+?y?N>HVWHXYH~#H#H$#H%#O*
?]bg$l/r6?<?B?G?>?M?:* ??*?g?i*?kY?m?o*?kY?m?q*?kY?m?s*t?w*+?y?N :VW:XY:F#O"?]bg"l-r4?9?>5M?9*??*?g?i*?kY?m?o*?kY?m?q*?kY?m?s*t?w*+?y?N9VW9XYO"]bg!l,r38.?M/*???NVWO/?M/*???NVWO0?M/*???NVWO67M?E#*??
?;Y??A?$??
?;Y??A?%??
?;Y??A?*#??*%b??*$b???N*EVWE.'E0'E/'O*
+,./!1'21465=6D7P?SM?
?	@	B?7?7*?i????:		???R	???:

????7??@??7
????7!??B??7???*?i????6	*	?!?m?????*	??m?????*?q??*?s!?DZNR>6?#4@??
?VW??#??#	??#??#?C?2	OZ;<=	>?4@>AEBHDPETG^HeIhKpLtNwO?P?Q?R?S?TPa???)??@??W??MMF
*??*+?ԱN
VW
?[OXY	Z??M?G$??!?#$n8*????&*??f??!?*??8!ؔ??B?	*??8!?j??N4GVWG?'G?'G?#
:?'O.]_a
cd#e%g+h3i:m@oP	???M/*?w?NVWOv??M_	??
?;Y?A?*?w?NVW"#O????P?M2*?o??NVWO???M?	C*?{*!?}??7*?i????:??????:??????N45
??CVWC?#C?#4?#O??
??5???B?P???"??M/*?{?NVWO???M?<*?{??B*?i????:??????:??!????N*/	??<VW<?#	3?#O??	?/?8?;?P???!??M/*?}?NVWO???M?<*?}??B*?i????:??????:??!????N*/	??<VW<?#	3?#O??	?/?8?;?P???!?SM6*?????NVWO
????M$?+?M,??N*?i-??:?k?Y?:?Y???QY*?Y??"+???%?)*?H?,??	?/??2?2?5*?i-?9W?N4?VW?<=?>?@p??O6
????#?,?8?N?f?l?t?~???P??;
ABMS*+?FW*???I*+?K?NVW<=O??
??QDLBM0*???I+?M,??N*?i-?O?:??Y:?,?R?o??S:???X???:*?W?[7*???^???^Y?/e?/*?ou?bX+?W?f?jW????K*?o?/u?bX??S:???)???:?W?l??W?l?nW?????qç:
?
?*+?v*+?y*+?{?0????NRd;?#YFT|?T|VW<=>??@%???Oj????%?*?0?9?Y?d?m?w?????????????????????
P3?C?;
??^??,?Ms?QD}~M|	?*,?[B??7!	???*??!*??*????7+???:	*?i	??:
	7
?V
??!*?}*????7*?™:
????7
*?s??7
	??	7

??
7*
????7??7*+??7ؔ?+???:
?????;???Y???"??:??
????:??+?????)??
????+????
??W+????????+?ȹ?:????:??Y+??:??+???׹?W????????@PD???
?
?c??Z???V?QD??M?E+???:*?i??:?# *???? a?2e*????*??A ?N>EVWE<=E?#E?#7?@'??ODEF#G>HCKP?C
??M?*+???:*?i??:?	 ?2?N4*VW*<=*?#?@??OPQR#S)UP?)
??M2*?q??NVWOf??M2*?s??NVWOj??M3	?Y*???N	VWOrKSg?Mf
*,?[7??7	??*??*??*????7+???:
*?i
??:	7?W??*?{*????7*?ę:????7*?q??7	??	7??7*????7??7ؔ?]?????D???Y??"??:??+???????:??+?????)??*+,-??*+,	-??Nzu-#~$	#(??#6??@
F???I??#VW<=?Ucd?#?#Or????(?6?F?I?N?d?k?u?~???????????????????????????P>???
?
?T?
?QDM"	(+?:

??:*?i??:?
*+?F:76Y:?	??4???)*??!?^??!?^+,	?jW?5ñ*????a?5e*????	*??7?Ya,!	?:
?
?Y?/!a?/*?o!?bX*+?/?*?o??*?w??6ç:???	*+?
?7:+???Y*+? ?׹?W?;r?s?????N??B!|
(VW(<=(?U(?#("#(?#(cd	 >
?@"???5!|
2?##5?$2#%#	&?Oz???"?'?.?2?5?;?M?U?^?h?o?s??????????????????????????	?'?P??.;
?D?;
"?N?;
??;
s?
?;

'(M?
?,Y:?,??+?:?p?!??K?-7*???^,???^,Y?/e?/*?ou?bX+?W?f?jW,!?5?,??0?,??+?:???,???*+?vç:	?	?+?4W??????N>'>?#?!|?VW?<=?????#OR???? ?'?0?9?D?O?`?e?h?q?t???????????P??V?Es?&'Me/?YT?7*?8?":?"*?{??




© 2015 - 2025 Weber Informatics LLC | Privacy Policy