
com.groupbyinc.flux.common.jboss.netty.handler.traffic.AbstractTrafficShapingHandler.class Maven / Gradle / Ivy
???? 1? Tcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler Ccom/groupbyinc/flux/common/jboss/netty/channel/SimpleChannelHandler Fcom/groupbyinc/flux/common/jboss/netty/util/ExternalResourceReleasable "AbstractTrafficShapingHandler.java hcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReopenReadTimerTask ReopenReadTimerTask ncom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$SimpleObjectSizeEstimator SimpleObjectSizeEstimator dcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReadWriteStatus ReadWriteStatus logger ?Lcom/groupbyinc/flux/common/jboss/netty/logging/InternalLogger; DEFAULT_CHECK_INTERVAL J ? DEFAULT_MAX_TIME :? DEFAULT_MAX_SIZE @ MINIMAL_WAIT
.CHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX I -GLOBAL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX 4GLOBALCHANNEL_DEFAULT_USER_DEFINED_WRITABILITY_INDEX trafficCounter GLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounter; objectSizeEstimator ALcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator; timer 3Lcom/groupbyinc/flux/common/jboss/netty/util/Timer; timeout 5Lcom/groupbyinc/flux/common/jboss/netty/util/Timeout;
writeLimit readLimit
checkInterval maxTime
maxWriteDelay maxWriteSize release +Ljava/util/concurrent/atomic/AtomicBoolean; index userDefinedWritabilityIndex ()I Ycom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalChannelTrafficShapingHandler : Rcom/groupbyinc/flux/common/jboss/netty/handler/traffic/GlobalTrafficShapingHandler < this VLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler; init {(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJ)V "java/lang/IllegalArgumentException B maxTime must be positive D (Ljava/lang/String;)V F G
C H ) * J + , L / N 0 P 1 R 2 T newObjectSizeEstimator newTimer
newWriteLimit newReadLimit newCheckInterval
newMaxTime setTrafficCounter J(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounter;)V ' ( ^ newTrafficCounter 9(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJ)V ()V F b
c ? 3 g 4 i )java/util/concurrent/atomic/AtomicBoolean k (Z)V F m
l n 5 6 p 8 9
r 7 ! t
c @ A
w z(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJ)V 8(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJ)V y(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJ)V 6(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;)V w(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;)V 7(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;J)V x(Lcom/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimator;Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;J)V :(Lcom/groupbyinc/flux/common/jboss/netty/util/Timer;JJJJ)V configure (JJJ)V (JJ)V ? ?
? (J)V ? ?
? Ecom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounter ? milliSecondFromNano ()J ? ?
? ? resetAccounting ? ?
? ? setCheckInterval ? ?
?
getWriteLimit
setWriteLimit getReadLimit setReadLimit getCheckInterval
? ? getMaxTimeWait setMaxTimeWait getMaxWriteDelay setMaxWriteDelay maxWriteDelay must be positive ? getMaxWriteSize setMaxWriteSize doAccounting counter releaseReadSuspended I(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)V checkAttachment ?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReadWriteStatus; ? ?
? readSuspend Z ? ? ? Dcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext ?
getChannel :()Lcom/groupbyinc/flux/common/jboss/netty/channel/Channel; ? ? ? ? 6com/groupbyinc/flux/common/jboss/netty/channel/Channel ? setReadable A(Z)Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelFuture; ? ? ? ? ctx FLcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext; rws fLcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler$ReadWriteStatus; messageReceived ?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;)V java/lang/Exception ? ;com/groupbyinc/flux/common/jboss/netty/channel/MessageEvent ?
getMessage ()Ljava/lang/Object; ? ? ? ?
calculateSize (Ljava/lang/Object;)J ? ?
? readTimeToWait (JJJJ)J ? ?
? ? checkWaitReadTime K(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;JJ)J ? ?
? get ()Z ? ?
l ? isConnected ? ? ? ? ? =com/groupbyinc/flux/common/jboss/netty/logging/InternalLogger ? isDebugEnabled ? ? ? ? java/lang/StringBuilder ?
? c Read suspend: ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? (J)Ljava/lang/StringBuilder; ? ?
? ? (C)Ljava/lang/StringBuilder; ? ?
? ?
isReadable ? ? ? ? (Z)Ljava/lang/StringBuilder; ? ?
? ? toString ()Ljava/lang/String; ? ?
? ? debug ? G ? ? java/lang/Thread ? sleep ?
Suspend final status => reopenReadTimerTask 7Lcom/groupbyinc/flux/common/jboss/netty/util/TimerTask; ?(Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/AbstractTrafficShapingHandler;Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;)V F
java/util/concurrent/TimeUnit
MILLISECONDS Ljava/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; - . informReadOperation J(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;J)V
sendUpstream @(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelEvent;)V ?! channel 8Lcom/groupbyinc/flux/common/jboss/netty/channel/Channel; wait size evt =Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent; now writeRequested writeTimeToWait+ ?
?, Write suspend: .
isWritable0 ? ?1 getUserDefinedWritability (I)Z34 ?5 submitWrite ?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;JJJ)V78
9 internalSubmitWrite Ljava/lang/Deprecated; sendDownstream= ?> ?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/MessageEvent;J)V delay setWritable J(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Z)V setUserDefinedWritability (IZ)VDE ?F writable checkWriteSuspend K(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;JJ)VBC
K queueSize releaseWriteSuspended getTrafficCounter I()Lcom/groupbyinc/flux/common/jboss/netty/handler/traffic/TrafficCounter; releaseExternalResources stopR b
?S setU m
lV 3com/groupbyinc/flux/common/jboss/netty/util/TimeoutX cancelZ bY[
getAttachment] ? ?^
c
setAttachment (Ljava/lang/Object;)Vab ?c channelConnected ?(Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelHandlerContext;Lcom/groupbyinc/flux/common/jboss/netty/channel/ChannelStateEvent;)Vef
g e BLcom/groupbyinc/flux/common/jboss/netty/channel/ChannelStateEvent; ?com/groupbyinc/flux/common/jboss/netty/util/ObjectSizeEstimatork estimateSize (Ljava/lang/Object;)Imnlo obj Ljava/lang/Object; (I)V Fs
?t !TrafficShaping with Write Limit: v
Read Limit: x CheckInterval: z maxDelay: |
maxSize: ~ and Counter: ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ??
?? none? builder Ljava/lang/StringBuilder; Dcom/groupbyinc/flux/common/jboss/netty/logging/InternalLoggerFactory? getInstance R(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/jboss/netty/logging/InternalLogger;??
??
ConstantValue Code LocalVariableTable LineNumberTable
Exceptions
Deprecated RuntimeVisibleAnnotations
SourceFile InnerClasses! ? ? ? ? ! ? " # ! ? $ % ! ? &