Package io.activej.bytebuf
Class ByteBufPool.ByteBufPoolStats
java.lang.Object
io.activej.bytebuf.ByteBufPool.ByteBufPoolStats
- All Implemented Interfaces:
ByteBufPool.ByteBufPoolStatsMXBean
- Enclosing class:
- ByteBufPool
public static final class ByteBufPool.ByteBufPoolStats
extends Object
implements ByteBufPool.ByteBufPoolStatsMXBean
Manages stats for this
ByteBufPool. You can get the
amount of created and reused ByteBufs and amount of ByteBufs
stored in each of the slabs.
Also, you can get a String which contains information about amount of created and stored in pool ByteBufs.
For memory control, you can get the size of your ByteBufPool in Byte or KB as well as get information about the slabs themselves (size, amount of ByteBufs created, reused, stored in pool, and total size in KB) and unrecycled ByteBufs.
Finally, it allows to clear this ByteBufPool and its registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidintintlonglongintlonglongqueryUnrecycledBufs(int limit)
-
Constructor Details
-
ByteBufPoolStats
public ByteBufPoolStats()
-
-
Method Details
-
getCreatedItems
public int getCreatedItems()- Specified by:
getCreatedItemsin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getReusedItems
public int getReusedItems()- Specified by:
getReusedItemsin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getPoolItems
public int getPoolItems()- Specified by:
getPoolItemsin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getPoolItemsString
-
getPoolSize
public long getPoolSize()- Specified by:
getPoolSizein interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getPoolSizeKB
public long getPoolSizeKB()- Specified by:
getPoolSizeKBin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getTotalSlabMins
public long getTotalSlabMins()- Specified by:
getTotalSlabMinsin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getTotalEvicted
public long getTotalEvicted()- Specified by:
getTotalEvictedin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getUnrecycledBufs
-
queryUnrecycledBufs
- Specified by:
queryUnrecycledBufsin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
getPoolSlabs
- Specified by:
getPoolSlabsin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
clear
public void clear()- Specified by:
clearin interfaceByteBufPool.ByteBufPoolStatsMXBean
-
clearRegistry
public void clearRegistry()- Specified by:
clearRegistryin interfaceByteBufPool.ByteBufPoolStatsMXBean
-