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

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

There is a newer version: 59
Show newest version
????1VYcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandlerTcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler'GlobalChannelTrafficShapingHandler.javaHLcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandler$Sharable;`com/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$ToSendToSenddcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel

PerChannel[com/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$2
[com/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$1dcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReadWriteStatusReadWriteStatusFcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandler$Sharable=com/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerSharablehcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReopenReadTimerTaskReopenReadTimerTasklogger?Lcom/groupbyinc/flux/common/jboss/netty/logging/InternalLogger;
channelQueues$Ljava/util/concurrent/ConcurrentMap;?Ljava/util/concurrent/ConcurrentMap;
queuesSize(Ljava/util/concurrent/atomic/AtomicLong;cumulativeWrittenBytescumulativeReadBytesmaxGlobalWriteSizeJwriteChannelLimitreadChannelLimitDEFAULT_DEVIATIONF=???
MAX_DEVIATION>???DEFAULT_SLOWDOWNDEFAULT_ACCELERATION????maxDeviationaccelerationFactorslowDownFactorreadDeviationActiveZwriteDeviationActivecreateGlobalTrafficCounter6(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;)VsetMaxDeviation(FFF)V9:
;"java/lang/IllegalArgumentException=Timer must not be null?(Ljava/lang/String;)VAB
>CRcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficCounterEGlobalChannelTCG
checkIntervalI&	J?(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;Ljava/lang/String;J)VAL
FMsetTrafficCounterJ(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounter;)VOP
QEcom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounterSstart()VUV
TWthis[Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler;timer3Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;tcGLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounter;userDefinedWritabilityIndex()I<(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJJJ)V:(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJ)VAb
cFcom/groupbyinc/flux/common/jboss/netty/util/internal/ConcurrentHashMapeAV
fg	i&java/util/concurrent/atomic/AtomicLongk
lg!"	n#"	p$"	r%&	v78
x'&	z(&	|writeGlobalLimitreadGlobalLimitmaxTime;(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJJ)V9(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJ)VA?
?8(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJ)VA?
?7(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;J)VA?
?A8
?}(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJJJ)V{(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJ)VA?
?objectSizeEstimatorALcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;
writeLimit	readLimit|(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJJ)Vz(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJ)VA?
?y(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJ)VA?
?x(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;J)VA?
?w(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;)VA?
?()F1*	?2*	?3*	?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?^	?getCumulativeWrittenBytes()J??
T?getCumulativeReadBytes??
T?size?`??45	?65	?set(J)V??
l?value
perChannelfLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;i$Ljava/util/Iterator;maxWrittenBytesmaxReadBytesminWrittenBytesminReadBytesmultipledoAccounting?V
??P
?countercomputeBalancedWait(FFJ)J
maxLocal	maxGlobalwaitratiogetMaxGlobalWriteSizesetMaxGlobalWriteSizeget??
l?configureChannel(JJ)VmilliSecondFromNano??
T?resetAccounting?
T
newWriteLimitnewReadLimitnowgetWriteChannelLimitsetWriteChannelLimitgetReadChannelLimitsetReadChannelLimitreleasetrafficCounter^	
stopV
TgetOrSetPerChannel?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;Dcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext
getChannel:()Lcom/groupbyinc/flux/common/jboss/netty/channel/Channel;java/lang/ObjecthashCode`
java/lang/IntegervalueOf(I)Ljava/lang/Integer;!"
 #&(Ljava/lang/Object;)Ljava/lang/Object;?%?&
gjava/util/LinkedList)
*g
messagesQueueLjava/util/List;,-	.java/lang/StringBuilder0
1g	ChannelTC3append-(Ljava/lang/String;)Ljava/lang/StringBuilder;56
17(I)Ljava/lang/StringBuilder;59
1:toString()Ljava/lang/String;<=
1>?(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;Ljava/lang/String;J)VA@
TA	queueSizeC&	DlastReadTimestampF&	GlastWriteTimestampI&	Jput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;LM?NctxFLcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;channel8Lcom/groupbyinc/flux/common/jboss/netty/channel/Channel;keyLjava/lang/Integer;channelConnected?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelStateEvent;)Vjava/lang/ExceptionX
ZresetCumulativeTime\V
T]VW
_eBLcom/groupbyinc/flux/common/jboss/netty/channel/ChannelStateEvent;
channelClosedremoved%?e	addAndGet(J)Jgh
lijava/util/ListkclearmVlnreleaseWriteSuspendedI(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)Vpq
rreleaseReadSuspendedtq
ucW
wmessageReceived?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;)VcheckAttachment?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReadWriteStatus;{|
};com/groupbyinc/flux/common/jboss/netty/channel/MessageEvent
getMessage????
calculateSize(Ljava/lang/Object;)J??
?getReadLimit??
??&	?readTimeToWait(JJJJ)J??
T???
?checkWaitReadTimeK(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;JJ)J??
?+Ljava/util/concurrent/atomic/AtomicBoolean;?	?)java/util/concurrent/atomic/AtomicBoolean???
??6com/groupbyinc/flux/common/jboss/netty/channel/Channel?isConnected????	?=com/groupbyinc/flux/common/jboss/netty/logging/InternalLogger?isDebugEnabled????Read suspend: ?(J)Ljava/lang/StringBuilder;5?
1?(C)Ljava/lang/StringBuilder;5?
1?
isReadable????(Z)Ljava/lang/StringBuilder;5?
1?readSuspend?5	?debug?B??[\	?java/lang/Thread?sleep??
??setReadableA(Z)Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelFuture;????Suspend final status => ?reopenReadTimerTask7Lcom/groupbyinc/flux/common/jboss/netty/util/TimerTask;??	??(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler;Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)VA?
?java/util/concurrent/TimeUnit?MILLISECONDSLjava/util/concurrent/TimeUnit;??	??1com/groupbyinc/flux/common/jboss/netty/util/Timer?
newTimeout?(Lcom/groupbyinc/flux/common/jboss/netty/util/TimerTask;JLjava/util/concurrent/TimeUnit;)Lcom/groupbyinc/flux/common/jboss/netty/util/Timeout;????timeout5Lcom/groupbyinc/flux/common/jboss/netty/util/Timeout;??	?informReadOperationJ(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;J)V??
?sendUpstream@(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelEvent;)V???maxLocalRead
maxGlobalRead
waitGlobalrwsfLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReadWriteStatus;evt=Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;maximumCumulativeWrittenBytesmaximumCumulativeReadByteschannelTrafficCounters^(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler;)VA?
?writeRequested
getWriteLimit??
?writeTimeToWait??
T?submitWrite?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;JJJ)V??

maxLocalWritemaxGlobalWriteisEmpty?lbytesRealWriteFlowControl?
TsendDownstream
??(JLcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;JLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$1;)VA
add(Ljava/lang/Object;)ZlcheckWriteSuspendK(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;JJ)V
setWritableJ(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Z)V
relativeTimeAction&	(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler;Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;J)VA
 
writedelay	newToSendbLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$ToSend;delayglobalSizeExceeded	futureNowforSchedulesendAllValid?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler$PerChannel;J)V(I)Ljava/lang/Object;d+l,?&	.toSend0?	1(ILjava/lang/Object;)V3l4(I)VA6
17
> Write Channel Limit: : Read Channel Limit: <
access$100)*
?x0x1x2x3Dcom/groupbyinc/flux/common/jboss/netty/logging/InternalLoggerFactoryFgetInstanceR(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/jboss/netty/logging/InternalLogger;HI
GJ	Signature
ConstantValueCodeLocalVariableTableLineNumberTable
Exception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?h?j*?lY?m?o*?lY?m?q*?lY?m?s*t?w*,?y?O ?YZ????[\P"g^ch'm2s9h>i1?N/*???OYZPo2?N/*???OYZPv3?N/*???OYZP}9:N?E#-??
?>Y??D?$??
?>Y??D?%??
?>Y??D?*#??*%b??*$b???O*EYZE1*E3*E2*P*
????!?'?1?6?=?D??VN?
?	@	B?7?7*?j????:		???R	???:

?ʶ?7??@??7
?ʶ?7!??B??7???*?j????6	*	?!?m?????*	??m?????*?q??*?s!?ޱO\	>6?&4@??
Y??	?YZ??&??&	??&??&?C?5	PZ???	??4?>?E?H?P?T?^?e?h?p?t?w????????????PNF
*??*+???O
YZ
?^P??	???N?G$??!?#$n8*????&*??f??!?*??8!??B?	*??8!?j??O4GYZG?*G?*G?&
:?*P.???
??#?%?+?3?:?@???N/*?w?OYZP???N>*?w?OYZ%&P
??!?N2*?o???OYZP???N?	C*?{*!?}?7*?j????:??????:??????O>5
??#??CYZC&C&4&P??
??5???B??N/*?{?OYZP?N?<*?{?B*?j????:??????:??!????O4/	??"??<YZ<?&	3&P		/
8;	?N/*?}?OYZP
?N?<*?}?B*?j????:??????:??!????O4/	??"??<YZ<?&	3&P	/8;VN6*???OYZP
$%N?+?M,??$N*?j-?'?:?k?Y?(:?*Y?+?/?TY*?1Y?24?8+???;??*?K?B??	?E??H?H?K*?j-?OW?O4?YZ?PQ?RSTUp??P2)*+,#-,.80f2l3t4~5?7VWN^*+?[W*??^*+,?`?O YZPQabP<=
>?QYcWNi*??^+?N-??$:*?j?f?:?/Y:?*?o?Eu?jX?/?oç:??*+?s*+?v*+,?x?2MPPUPO>iYZiPQiab[RSRTU'B??P6
CDEF'G,I2J@KJLXN]ObPhQQYyzNX	?B+?~:*,????7	???*?*??*??!??7+???$:
*?j
?'?:	7?V??*?}*??!??7*?ؙ:?ʶ?7*?s??7	??	7??7*????7??7*+!??7?*???????+?:?????߲?????B?T?Z?c?n?????????????????QY??N?E+???$:*?j?'?:?# *???? a?He*????*??A ?O>EYZEPQE?&E&7TU'??P???#?>?C???N?*+???$:*?j?'?:?	 ?H?O4*YZ*PQ*&TU??P???#?)???N2*?q???OYZP???N2*?s???OYZP???N3	?Y*???O	YZP?LR?zN?	?	B*,????7?7	???*?*??*????7	+???$:*?j?'?:?T??*?{*????B*?ڙ8?ʶ?7
*?q??7
	??	7

??
7*
??!??B!	??	B!?
*?????	B??:??:*+,!????????Opx+&
?"&/??&	=?TUMt???YZ?PQ?????&??&?&Pf?????/?=?M?R?g?n?x??????????????????
?QY??N?+?:		??$:
*?j
?'?:?
*+?[:76Y:?	??A?/??4	???ñ*?!?	??!?	+,??Kñ*????a?Ke*????	*??7*???=??+????ñ*?!?	??!?	+,??Kñ+????ñ?Ya,!?:?/?WY?E!a?E*?o!?jX*+?E?*?o??*?w??6ç:???	*+??7:*???Y*+?!?׹?W?;\L]L??L??L??L?ILLQLO??YZ?PQ?????&?"&?&RS	uTU
"e???#$2U%&5R&5f!'&j(?P?+"'.25;OY!]#e$n%u&|'?)?*?,?.?/?1?3?4?5?6?7?9?;?=>?@(A4BCCFETFYG_IfJjK?PQY)*Nk
?,Y:?,?/???,?/?-?:?!??V+?????W?/7*??	,???	,Y?Ee?E*?ou?jX+?2?,!?K?,?/?5???y,?/??*+?sç:	?	???????O>B8?& l#$?YZ?PQ????&PVUVW X*Y8[;]B^K_T`_ajbuczd}e?f?h?i?j?l?mQY<=NY/?1YT?8*?9?8;?8*?{??=?8*?}?????O/YZPq>NP*+,!?@?O*AZBQC?D&PXQYEVN!	?K???PYST:	&	U




© 2015 - 2025 Weber Informatics LLC | Privacy Policy