home *** CD-ROM | disk | FTP | other *** search
- package sun.misc;
-
- import java.util.Enumeration;
- import java.util.Vector;
-
- // $FF: renamed from: sun.misc.VM
- public class class_0 {
- public static final int STATE_GREEN = 1;
- public static final int STATE_YELLOW = 2;
- public static final int STATE_RED = 3;
- static Vector callbacks = new Vector();
- static VMNotifierThread notifier;
- static VMNotifierThread notifier_red = new VMNotifierThread("Red Alloc State Notifier");
-
- public static final native int getState();
-
- static final native boolean threadsSuspended();
-
- public static boolean allowThreadSuspension(ThreadGroup var0, boolean var1) {
- return var0.allowThreadSuspension(var1);
- }
-
- public static native void unsuspendThreads();
-
- public static native void unsuspendSomeThreads();
-
- public static void registerVMNotification(VMNotification var0) {
- callbacks.addElement(var0);
- }
-
- static VMNotifierThread whichNotifier(int var0) {
- return var0 == 3 ? notifier_red : notifier;
- }
-
- public static void asChange(int var0, int var1) {
- whichNotifier(var1).enqueue(var0, var1);
- }
-
- public static void asChange_otherthread(int var0, int var1) {
- Enumeration var2 = callbacks.elements();
-
- while(var2.hasMoreElements()) {
- ((VMNotification)var2.nextElement()).newAllocState(var0, var1, true);
- }
-
- }
-
- public static native void resumeJavaMonitor();
-
- public static native void suspendJavaMonitor();
-
- public static native void resetJavaMonitor();
-
- public static native void writeJavaMonitorReport();
-
- static {
- notifier_red.setPriority(10);
- notifier_red.start();
- notifier = new VMNotifierThread("Alloc State Notifier");
- notifier.setPriority(notifier_red.getPriority() - 1);
- notifier.start();
- }
- }
-