net.myrrix.common
Class JVMEnvironment

java.lang.Object
  extended by net.myrrix.common.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()
           
 int getMaxMemoryMB()
           
 int getNumProcessors()
           
 int getPercentUsedMemory()
           
 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.

getUsedMemoryMB

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

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.