public enum GcControls extends Enum<GcControls>
Note this is inherently unreliable for a number of reasons so shouldn't be expected to work.
| Modifier and Type | Method and Description |
|---|---|
static long |
getGcCount()
Get the GC count
|
static void |
requestGcCycle()
Request a GC
|
static GcControls |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GcControls[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static void |
waitForGcCycle()
Request a GC and block until it occurs
|
public static GcControls[] values()
for (GcControls c : GcControls.values()) System.out.println(c);
public static GcControls valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static void requestGcCycle()
public static void waitForGcCycle()
IllegalStateException - if the GC doesn't occur within one secondpublic static long getGcCount()
Copyright © 2023. All rights reserved.