org.apache.blur.utils
Class GCWatcher
java.lang.Object
org.apache.blur.utils.GCWatcher
public class GCWatcher
- extends Object
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. |
GCWatcher
public GCWatcher()
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
GCAction
s 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.