Class UnpooledByteBufAllocator.UnpooledByteBufAllocatorMetric
java.lang.Object
io.netty.buffer.UnpooledByteBufAllocator.UnpooledByteBufAllocatorMetric
- All Implemented Interfaces:
ByteBufAllocatorMetric
- Enclosing class:
UnpooledByteBufAllocator
private static final class UnpooledByteBufAllocator.UnpooledByteBufAllocatorMetric
extends java.lang.Object
implements ByteBufAllocatorMetric
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final java.util.concurrent.atomic.LongAdder(package private) final java.util.concurrent.atomic.LongAdder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjava.lang.StringtoString()longReturns the number of bytes of direct memory used by aByteBufAllocatoror-1if unknown.longReturns the number of bytes of heap memory used by aByteBufAllocatoror-1if unknown.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
directCounter
final java.util.concurrent.atomic.LongAdder directCounter -
heapCounter
final java.util.concurrent.atomic.LongAdder heapCounter
-
-
Constructor Details
-
UnpooledByteBufAllocatorMetric
private UnpooledByteBufAllocatorMetric()
-
-
Method Details
-
usedHeapMemory
public long usedHeapMemory()Description copied from interface:ByteBufAllocatorMetricReturns the number of bytes of heap memory used by aByteBufAllocatoror-1if unknown.- Specified by:
usedHeapMemoryin interfaceByteBufAllocatorMetric
-
usedDirectMemory
public long usedDirectMemory()Description copied from interface:ByteBufAllocatorMetricReturns the number of bytes of direct memory used by aByteBufAllocatoror-1if unknown.- Specified by:
usedDirectMemoryin interfaceByteBufAllocatorMetric
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-