use of org.apache.geode.internal.offheap.OffHeapMemoryStats in project geode by apache.
the class MemberMBeanBridge method getOffHeapCompactionTime.
public long getOffHeapCompactionTime() {
long compactionTime = 0;
OffHeapMemoryStats stats = getOffHeapStats();
if (null != stats) {
compactionTime = stats.getDefragmentationTime();
}
return compactionTime;
}
use of org.apache.geode.internal.offheap.OffHeapMemoryStats in project geode by apache.
the class MemberMBeanBridge method getOffHeapStats.
/**
* Returns the OffHeapMemoryStats for this VM.
*/
private OffHeapMemoryStats getOffHeapStats() {
OffHeapMemoryStats stats = null;
MemoryAllocator offHeap = this.cache.getOffHeapStore();
if (null != offHeap) {
stats = offHeap.getStats();
}
return stats;
}
use of org.apache.geode.internal.offheap.OffHeapMemoryStats in project geode by apache.
the class MemberMBeanBridge method getOffHeapUsedMemory.
public long getOffHeapUsedMemory() {
long usedSize = 0;
OffHeapMemoryStats stats = getOffHeapStats();
if (null != stats) {
usedSize = stats.getUsedMemory();
}
return usedSize;
}
use of org.apache.geode.internal.offheap.OffHeapMemoryStats in project geode by apache.
the class MemberMBeanBridge method getOffHeapMaxMemory.
public long getOffHeapMaxMemory() {
long usedSize = 0;
OffHeapMemoryStats stats = getOffHeapStats();
if (null != stats) {
usedSize = stats.getMaxMemory();
}
return usedSize;
}
use of org.apache.geode.internal.offheap.OffHeapMemoryStats in project geode by apache.
the class MemberMBeanBridge method init.
public MemberMBeanBridge init() {
CachePerfStats cachePerfStats = this.cache.getCachePerfStats();
addCacheStats(cachePerfStats);
addFunctionStats(system.getFunctionServiceStats());
if (system.getDistributionManager().getStats() instanceof DistributionStats) {
DistributionStats distributionStats = (DistributionStats) system.getDistributionManager().getStats();
addDistributionStats(distributionStats);
}
if (PureJavaMode.osStatsAreAvailable()) {
Statistics[] systemStats = null;
if (HostStatHelper.isSolaris()) {
systemStats = system.findStatisticsByType(SolarisSystemStats.getType());
} else if (HostStatHelper.isLinux()) {
systemStats = system.findStatisticsByType(LinuxSystemStats.getType());
} else if (HostStatHelper.isOSX()) {
// @TODO once OSX stats are implemented
systemStats = null;
} else if (HostStatHelper.isWindows()) {
systemStats = system.findStatisticsByType(WindowsSystemStats.getType());
}
if (systemStats != null) {
systemStat = systemStats[0];
}
}
MemoryAllocator allocator = this.cache.getOffHeapStore();
if ((null != allocator)) {
OffHeapMemoryStats offHeapStats = allocator.getStats();
if (null != offHeapStats) {
addOffHeapStats(offHeapStats);
}
}
addSystemStats();
addVMStats();
initializeStats();
return this;
}
Aggregations