01: /*
02: * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25:
26: package com.sun.management;
27:
28: /**
29: * Platform-specific management interface for the operating system
30: * on which the Java virtual machine is running.
31: *
32: * <p>
33: * The <tt>OperatingSystemMXBean</tt> object returned by
34: * {@link java.lang.management.ManagementFactory#getOperatingSystemMXBean()}
35: * is an instance of the implementation class of this interface
36: * or {@link UnixOperatingSystemMXBean} interface depending on
37: * its underlying operating system.
38: *
39: * @author Mandy Chung
40: * @version 1.16, 05/05/07
41: * @since 1.5
42: */
43: public interface OperatingSystemMXBean extends
44: java.lang.management.OperatingSystemMXBean {
45:
46: /**
47: * Returns the amount of virtual memory that is guaranteed to
48: * be available to the running process in bytes,
49: * or <tt>-1</tt> if this operation is not supported.
50: *
51: * @return the amount of virtual memory that is guaranteed to
52: * be available to the running process in bytes,
53: * or <tt>-1</tt> if this operation is not supported.
54: */
55: public long getCommittedVirtualMemorySize();
56:
57: /**
58: * Returns the total amount of swap space in bytes.
59: *
60: * @return the total amount of swap space in bytes.
61: */
62: public long getTotalSwapSpaceSize();
63:
64: /**
65: * Returns the amount of free swap space in bytes.
66: *
67: * @return the amount of free swap space in bytes.
68: */
69: public long getFreeSwapSpaceSize();
70:
71: /**
72: * Returns the CPU time used by the process on which the Java
73: * virtual machine is running in nanoseconds. The returned value
74: * is of nanoseconds precision but not necessarily nanoseconds
75: * accuracy. This method returns <tt>-1</tt> if the
76: * the platform does not support this operation.
77: *
78: * @return the CPU time used by the process in nanoseconds,
79: * or <tt>-1</tt> if this operation is not supported.
80: */
81: public long getProcessCpuTime();
82:
83: /**
84: * Returns the amount of free physical memory in bytes.
85: *
86: * @return the amount of free physical memory in bytes.
87: */
88: public long getFreePhysicalMemorySize();
89:
90: /**
91: * Returns the total amount of physical memory in bytes.
92: *
93: * @return the total amount of physical memory in bytes.
94: */
95: public long getTotalPhysicalMemorySize();
96: }
|