| java.lang.Object java.lang.VMExecutionEngine
VMExecutionEngine | final class VMExecutionEngine (Code) | | Provides the methods to interact with VM Execution Engine that are used by
different classes from the java.lang package, such as System,
Runtime.
This class must be implemented according to the common policy for porting
interfaces - see the porting interface overview for more detailes.
|
Method Summary | |
native static long | currentTimeMillis() Returns the current system time in milliseconds since
the Unix epoch (midnight, 1 Jan, 1970). | static void | exit(int status, boolean needFinalization) Terminates a Virtual Machine with possible invocation of finilization
methods. | native static int | getAssertionStatus(Class clss, boolean recursive, int defaultStatus) This method provides an information about the assertion status specified
via command line options.
See Also: java.lang.Class.desiredAssertionStatus Parameters: clss - the class to be initialized with the assertion status. | native static int | getAvailableProcessors() This method satisfies the requirements of the specification for the
Runtime.availableProcessors Runtime.availableProcessors() method. | native static Properties | getProperties() This method satisfies the requirements of the specification for the
System.getProperties System.getProperties() method.
Additionally a class library implementation may relay on existance of
the following properties "vm.boot.class.path" & "vm.boot.library.path".
The "vm.boot.class.path" property can be used to load classes and
resources which reside in the bootstrap sequence of the VM.
The "vm.boot.library.path" property can be used to find libraries that
should be obtatined by classes which were loaded by bootstrap class loader. | native static String | mapLibraryName(String libname) Returns platform-specific name of the specified library. | native static long | nanoTime() Returns the current value of a system timer with the best accuracy
the OS can provide, in nanoseconds. | public static void | registerShutdownAction(Runnable action) Adds the specified action to the list of shutdown actions. | native static void | traceInstructions(boolean enable) This method satisfies the requirements of the specification for the
Runtime.traceInstructions(boolean)Runtime.traceInstructions(boolean on) method. | native static void | traceMethodCalls(boolean enable) This method satisfies the requirements of the specification for the
Runtime.traceMethodCalls(boolean)Runtime.traceMethodCalls(boolean on) method. |
currentTimeMillis | native static long currentTimeMillis()(Code) | | Returns the current system time in milliseconds since
the Unix epoch (midnight, 1 Jan, 1970).
|
exit | static void exit(int status, boolean needFinalization)(Code) | | Terminates a Virtual Machine with possible invocation of finilization
methods. This method is used by the
Runtime.exit(int)Runtime.exit(int status) and
Runtime.halt(int)Runtime.halt(int satus) methods implementation. When it is called by the
Runtime.exit(int status) method all shutdown hook threads
should have been already finished. The needFinilization argument must
be true if uninvoked finilizers should be called on VM exit. The
implementation simply calls the
VMExecutionEngine.exit(intbooleanRunnable[]) VMExecutionEngine.exit(int status, boolean needFinalization, Runnable[] shutdownSequence) method with an array of
Runnable objects which were registered before by means of
the
VMExecutionEngine.registerShutdownAction(Runnable) VMExecutionEngine.registerShutdownAction(Runnable action) method.
Parameters: status - exit status Parameters: needFinalize - specifies that finalization must be performed. Iftrue then it perfoms finalization of all not finalized objectsthat have finalizers |
getAssertionStatus | native static int getAssertionStatus(Class clss, boolean recursive, int defaultStatus)(Code) | | This method provides an information about the assertion status specified
via command line options.
See Also: java.lang.Class.desiredAssertionStatus Parameters: clss - the class to be initialized with the assertion status. Note, assertion status is applicable to top-level classes only, thereforeany member/local class passed is a subject to conversion to correspondingtop-level declaring class. Also, null argument can be used to check if any assertion was specified through command line options. Parameters: recursive - controls whether this method should check exact matchwith name of the class, or check (super)packages recursively (most specific one has precedence). Parameters: defaultStatus - if no specific package setting found, this value may override command-line defaults. This parameter isactual only when recursive == true . See Also: java.lang.ClassLoader.setDefaultAssertionStatus(boolean) See Also: 0 - unspecified, < 0 - false, > 0 - true |
getAvailableProcessors | native static int getAvailableProcessors()(Code) | | This method satisfies the requirements of the specification for the
Runtime.availableProcessors Runtime.availableProcessors() method.
|
getProperties | native static Properties getProperties()(Code) | | This method satisfies the requirements of the specification for the
System.getProperties System.getProperties() method.
Additionally a class library implementation may relay on existance of
the following properties "vm.boot.class.path" & "vm.boot.library.path".
The "vm.boot.class.path" property can be used to load classes and
resources which reside in the bootstrap sequence of the VM.
The "vm.boot.library.path" property can be used to find libraries that
should be obtatined by classes which were loaded by bootstrap class loader.
|
mapLibraryName | native static String mapLibraryName(String libname)(Code) | | Returns platform-specific name of the specified library.
|
nanoTime | native static long nanoTime()(Code) | | Returns the current value of a system timer with the best accuracy
the OS can provide, in nanoseconds.
|
registerShutdownAction | public static void registerShutdownAction(Runnable action)(Code) | | Adds the specified action to the list of shutdown actions. The
Runnable.run Runnable.run() method of the specified action
object is executed after all non-system threads have been stopped. Last
registered action is executed before previously registered actions. Each
action should not create threads inside. It is expected that registered
actions doesn't requre a lot of time to complete.
Typicily one may use this method to close open files, connections etc. on
Virtual Machine exit
Parameters: action - action which should be performed on VM exit |
traceInstructions | native static void traceInstructions(boolean enable)(Code) | | This method satisfies the requirements of the specification for the
Runtime.traceInstructions(boolean)Runtime.traceInstructions(boolean on) method.
|
traceMethodCalls | native static void traceMethodCalls(boolean enable)(Code) | | This method satisfies the requirements of the specification for the
Runtime.traceMethodCalls(boolean)Runtime.traceMethodCalls(boolean on) method.
|
|
|