net.myrrix.common.stats
Class JVMEnvironment

java.lang.Object
  extended by net.myrrix.common.stats.JVMEnvironment

public final class JVMEnvironment
extends Object

A bean encapsulating some characteristics of the JVM's runtime environment.

Author:
Sean Owen

Constructor Summary
JVMEnvironment()
           
 
Method Summary
 String getHostName()
           
 long getMaxMemory()
           
 int getMaxMemoryMB()
           
 int getNumProcessors()
           
 int getPercentUsedMemory()
           
 long getUsedMemory()
           
 int getUsedMemoryMB()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JVMEnvironment

public JVMEnvironment()
Method Detail

getNumProcessors

public int getNumProcessors()
Returns:
number of logical processors available to the JVM.

getUsedMemory

public long getUsedMemory()
Returns:
approximate heap used, in bytes

getUsedMemoryMB

public int getUsedMemoryMB()
Returns:
approximate heap used, in megabytes

getMaxMemory

public long getMaxMemory()
Returns:
maximum size that the heap may grow to, in bytes

getMaxMemoryMB

public int getMaxMemoryMB()
Returns:
maximum size that the heap may grow to, in megabytes

getPercentUsedMemory

public int getPercentUsedMemory()

getHostName

public String getHostName()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.