CavalliumDBEngine/src/main/java/it/cavallium/dbengine/netty/JMXPoolArenaNettyMonitoring.java

116 lines
2.1 KiB
Java
Raw Normal View History

2021-05-03 18:07:18 +02:00
package it.cavallium.dbengine.netty;
2021-09-09 15:21:20 +02:00
2021-09-17 16:56:28 +02:00
import io.net5.buffer.api.pool.PoolArenaMetric;
2021-05-03 18:07:18 +02:00
public class JMXPoolArenaNettyMonitoring implements JMXPoolArenaNettyMonitoringMBean {
private final PoolArenaMetric metric;
public JMXPoolArenaNettyMonitoring(PoolArenaMetric metric) {
this.metric = metric;
}
@Override
public Integer getNumThreadCaches() {
return metric.numThreadCaches();
}
@Deprecated
@Override
public Integer getNumTinySubpages() {
2021-09-09 15:21:20 +02:00
return 0;
2021-05-03 18:07:18 +02:00
}
@Override
public Integer getNumSmallSubpages() {
return metric.numSmallSubpages();
}
@Override
public Integer getNumChunkLists() {
return metric.numChunkLists();
}
@Override
public Long getNumAllocations() {
return metric.numAllocations();
}
@Override
public Long getNumTinyAllocations() {
2021-09-09 15:21:20 +02:00
return 0L;
2021-05-03 18:07:18 +02:00
}
@Override
public Long getNumSmallAllocations() {
return metric.numSmallAllocations();
}
@Override
public Long getNumNormalAllocations() {
return metric.numNormalAllocations();
}
@Override
public Long getNumHugeAllocations() {
return metric.numHugeAllocations();
}
@Override
public Long getNumDeallocations() {
return metric.numDeallocations();
}
@Override
public Long getNumTinyDeallocations() {
2021-09-09 15:21:20 +02:00
return 0L;
2021-05-03 18:07:18 +02:00
}
@Override
public Long getNumSmallDeallocations() {
return metric.numSmallDeallocations();
}
@Override
public Long getNumNormalDeallocations() {
return metric.numNormalDeallocations();
}
@Override
public Long getNumHugeDeallocations() {
return metric.numHugeDeallocations();
}
@Override
public Long getNumActiveAllocations() {
return metric.numActiveAllocations();
}
@Deprecated
@Override
public Long getNumActiveTinyAllocations() {
2021-09-09 15:21:20 +02:00
return 0L;
2021-05-03 18:07:18 +02:00
}
@Override
public Long getNumActiveSmallAllocations() {
return metric.numActiveSmallAllocations();
}
@Override
public Long getNumActiveNormalAllocations() {
return metric.numActiveNormalAllocations();
}
@Override
public Long getNumActiveHugeAllocations() {
return metric.numActiveHugeAllocations();
}
@Override
public Long getNumActiveBytes() {
return metric.numActiveBytes();
}
}