
com.groupbyinc.flux.common.netty.buffer.PooledByteBufAllocator.class Maven / Gradle / Ivy
???? 2 >com/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator @com/groupbyinc/flux/common/netty/buffer/AbstractByteBufAllocator Fcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocatorMetricProvider PooledByteBufAllocator.java Scom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator$PoolThreadLocalCache PoolThreadLocalCache ;com/groupbyinc/flux/common/netty/buffer/PoolArena$HeapArena 1com/groupbyinc/flux/common/netty/buffer/PoolArena
HeapArena =com/groupbyinc/flux/common/netty/buffer/PoolArena$DirectArena DirectArena logger GLcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger; DEFAULT_NUM_HEAP_ARENA I DEFAULT_NUM_DIRECT_ARENA DEFAULT_PAGE_SIZE DEFAULT_MAX_ORDER DEFAULT_TINY_CACHE_SIZE DEFAULT_SMALL_CACHE_SIZE DEFAULT_NORMAL_CACHE_SIZE "DEFAULT_MAX_CACHED_BUFFER_CAPACITY DEFAULT_CACHE_TRIM_INTERVAL !DEFAULT_USE_CACHE_FOR_ALL_THREADS Z %DEFAULT_DIRECT_MEMORY_CACHE_ALIGNMENT
MIN_PAGE_SIZE MAX_CHUNK_SIZE@ DEFAULT @Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator;
heapArenas 4[Lcom/groupbyinc/flux/common/netty/buffer/PoolArena; 8[Lcom/groupbyinc/flux/common/netty/buffer/PoolArena<[B>; directArenas K[Lcom/groupbyinc/flux/common/netty/buffer/PoolArena;
tinyCacheSize smallCacheSize normalCacheSize heapArenaMetrics Ljava/util/List; KLjava/util/List; directArenaMetrics threadCache ULcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator$PoolThreadLocalCache; chunkSize metric FLcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocatorMetric; ()V (Z)V 9 ;
< this ? A C E (ZIIII)V 9 G
H preferDirect (IIII)V
nHeapArena nDirectArena pageSize maxOrder Ljava/lang/Deprecated; Q S U (ZIIIIIII)V 9 W
X Z ! \
(ZIIIIIIIZI)V 9 ^
_ (ZIIIIIIIZ)V useCacheForAllThreads
< D(Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator;Z)V 9 d
e 4 5 g - i . k / m validateAndCalculateChunkSize (II)I o p
q 6 s "java/lang/IllegalArgumentException u java/lang/StringBuilder w 9 :
x y nHeapArena: { append -(Ljava/lang/String;)Ljava/lang/StringBuilder; } ~
x (I)Ljava/lang/StringBuilder; } ?
x ? (expected: >= 0) ? toString ()Ljava/lang/String; ? ?
x ? (Ljava/lang/String;)V 9 ?
v ?
nDirectArea: ? directMemoryCacheAlignment: ? %isDirectMemoryCacheAlignmentSupported ()Z ? ?
? +directMemoryCacheAlignment is not supported ? (expected: power of two) ? validateAndCalculatePageShifts (I)I ? ?
?
newArenaArray 7(I)[Lcom/groupbyinc/flux/common/netty/buffer/PoolArena; ? ?
? ( ) ? java/util/ArrayList ? (I)V 9 ?
? ? java/util/List ? H(Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator;IIIII)V 9 ?
? add (Ljava/lang/Object;)Z ? ? ? ? java/util/Collections ? unmodifiableList "(Ljava/util/List;)Ljava/util/List; ? ?
? ? 0 1 ? emptyList ()Ljava/util/List; ? ?
? ? + ) ?
? 3 1 ? Dcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocatorMetric ? C(Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator;)V 9 ?
? ? 7 8 ? arena =Lcom/groupbyinc/flux/common/netty/buffer/PoolArena$HeapArena; i metrics ?Lcom/groupbyinc/flux/common/netty/buffer/PoolArena$DirectArena; directMemoryCacheAlignment
pageShifts size
pageSize: ? (expected: ? ) ? (expected: power of 2) ? java/lang/Integer ? numberOfLeadingZeros ? ?
? ?
maxOrder: ? (expected: 0-14) ? 1pageSize (%d) << maxOrder (%d) must not exceed %d ? java/lang/Object ? valueOf (I)Ljava/lang/Integer; ? ?
? ? java/lang/String ? format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ? ?
? ?
newHeapBuffer 5(II)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; get ()Ljava/lang/Object; ? ?
? 7com/groupbyinc/flux/common/netty/buffer/PoolThreadCache ? heapArena 3Lcom/groupbyinc/flux/common/netty/buffer/PoolArena; ? ? ? ? allocate t(Lcom/groupbyinc/flux/common/netty/buffer/PoolThreadCache;II)Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBuf; ? ?
? @com/groupbyinc/flux/common/netty/util/internal/PlatformDependent hasUnsafe ?
Acom/groupbyinc/flux/common/netty/buffer/UnpooledUnsafeHeapByteBuf ?(Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocator;II)V 9
;com/groupbyinc/flux/common/netty/buffer/UnpooledHeapByteBuf
/com/groupbyinc/flux/common/netty/buffer/ByteBuf toLeakAwareBuffer d(Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf;)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf;
buf 1Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; initialCapacity maxCapacity cache 9Lcom/groupbyinc/flux/common/netty/buffer/PoolThreadCache; 7Lcom/groupbyinc/flux/common/netty/buffer/PoolArena<[B>; newDirectBuffer directArena ? ? 9com/groupbyinc/flux/common/netty/buffer/UnsafeByteBufUtil newUnsafeDirectByteBuf ?(Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocator;II)Lcom/groupbyinc/flux/common/netty/buffer/UnpooledUnsafeDirectByteBuf;!"
# =com/groupbyinc/flux/common/netty/buffer/UnpooledDirectByteBuf%
& Gcom/groupbyinc/flux/common/netty/buffer/AbstractReferenceCountedByteBuf( JLcom/groupbyinc/flux/common/netty/buffer/PoolArena; defaultNumHeapArena ()I defaultNumDirectArena defaultPageSize defaultMaxOrder defaultUseCacheForAllThreads defaultPreferDirect directBufferPreferred2 ?
3 defaultTinyCacheSize defaultSmallCacheSize defaultNormalCacheSize isDirectBufferPooled hasThreadLocalCache isSet: ?
; freeThreadLocalCache remove> :
? H()Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocatorMetric;
numHeapArenas ?, ?C numDirectArenas numThreadLocalCaches ) numThreadCaches +Ljava/util/concurrent/atomic/AtomicInteger;HI J )java/util/concurrent/atomic/AtomicIntegerL ?,
MN 6Lcom/groupbyinc/flux/common/netty/buffer/PoolArena<*>; arenas 7[Lcom/groupbyinc/flux/common/netty/buffer/PoolArena<*>; total usedHeapMemory ()J
usedMemory 7([Lcom/groupbyinc/flux/common/netty/buffer/PoolArena;)JVW
X usedDirectMemory???????? numActiveBytes]U
^??????? used J ;()Lcom/groupbyinc/flux/common/netty/buffer/PoolThreadCache; dumpStats
x ? heap arena(s):g 9com/groupbyinc/flux/common/netty/util/internal/StringUtili NEWLINE Ljava/lang/String;kl jm -(Ljava/lang/Object;)Ljava/lang/StringBuilder; }o
xp direct arena(s):r a
heapArenasLen Ljava/lang/StringBuilder; directArenasLen B()Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocatorMetric; 7A
y
access$000 v(Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator;)[Lcom/groupbyinc/flux/common/netty/buffer/PoolArena; x0
access$100
access$200 C(Lcom/groupbyinc/flux/common/netty/buffer/PooledByteBufAllocator;)I
access$300
access$400
access$500 ?
access$600 ? java/lang/Throwable? Lcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLoggerFactory? getInstance Z(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger;??
?? ? 3com.groupbyinc.flux.common.netty.allocator.pageSize? Acom/groupbyinc/flux/common/netty/util/internal/SystemPropertyUtil? getInt (Ljava/lang/String;I)I??
?? 3com.groupbyinc.flux.common.netty.allocator.maxOrder? java/lang/Runtime?
getRuntime ()Ljava/lang/Runtime;??
?? 2com/groupbyinc/flux/common/netty/util/NettyRuntime? availableProcessors?,
?? 8com.groupbyinc.flux.common.netty.allocator.numHeapArenas? maxMemory?U
?? java/lang/Math? min (JJ)J??
?? max? p
?? :com.groupbyinc.flux.common.netty.allocator.numDirectArenas? maxDirectMemory?U
? 8com.groupbyinc.flux.common.netty.allocator.tinyCacheSize? 9com.groupbyinc.flux.common.netty.allocator.smallCacheSize? :com.groupbyinc.flux.common.netty.allocator.normalCacheSize? Bcom.groupbyinc.flux.common.netty.allocator.maxCachedBufferCapacity? ?