org.apache.blur.utils
Class GCWatcher

java.lang.Object
  extended by org.apache.blur.utils.GCWatcher

public class GCWatcher
extends Object


Constructor Summary
GCWatcher()
           
 
Method Summary
static void init(double ratio)
          Initializes the GCWatcher to watch for any garbage collection that leaves more then the given ratio free.
static void registerAction(GCAction action)
          Registers an GCAction to be taken when the JVM is near an OutOfMemoryError condition.
static void shutdown()
          Shuts down any internal threads watching the JVM.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GCWatcher

public GCWatcher()
Method Detail

init

public static void init(double ratio)
Initializes the GCWatcher to watch for any garbage collection that leaves more then the given ratio free. If more remains then all the given GCActions are taken to try and relief the JVM from an OutOfMemoryError exception.

Parameters:
ratio - the ratio of used heap to total heap.

registerAction

public static void registerAction(GCAction action)
Registers an GCAction to be taken when the JVM is near an OutOfMemoryError condition.

Parameters:
action - the GCAction.

shutdown

public static void shutdown()
Shuts down any internal threads watching the JVM.



Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.