jodd.util
Class RuntimeUtil

java.lang.Object
  extended by jodd.util.RuntimeUtil

public class RuntimeUtil
extends java.lang.Object

Runtime utilities.


Field Summary
static java.lang.Runtime RUNTIME
           
 
Constructor Summary
RuntimeUtil()
           
 
Method Summary
static long availableMemory()
          Returns the amount of available memory (free memory plus never allocated memory).
static float availableMemoryPercent()
          Returns the amount of available memory in percents.
static void compactMemory()
          Compacts memory as much as possible by allocating huge memory block and then forcing garbage collection.
static java.lang.String currentMethod()
          Returns current method signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RUNTIME

public static final java.lang.Runtime RUNTIME
Constructor Detail

RuntimeUtil

public RuntimeUtil()
Method Detail

currentMethod

public static java.lang.String currentMethod()
Returns current method signature.


availableMemory

public static long availableMemory()
Returns the amount of available memory (free memory plus never allocated memory).


availableMemoryPercent

public static float availableMemoryPercent()
Returns the amount of available memory in percents.


compactMemory

public static void compactMemory()
Compacts memory as much as possible by allocating huge memory block and then forcing garbage collection.



Copyright © 2003-2012 Jodd Team