Class VMOption
java.lang.Object
com.sun.management.VMOption
Information about a VM option including its value and
where the value came from which is referred as its
origin
.
Each VM option has a default value. A VM option can
be set at VM creation time typically as a command line
argument to the launcher or an argument passed to the
VM created using the JNI invocation interface.
In addition, a VM option may be set via an environment
variable or a configuration file. A VM option can also
be set dynamically via a management interface after
the VM was started.
A VMOption
contains the value of a VM option
and the origin of that value at the time this VMOption
object was constructed. The value of the VM option
may be changed after the VMOption
object was constructed,
- Since:
- 1.6
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionVMOption
(String name, String value, boolean writeable, VMOption.Origin origin) Constructs aVMOption
. -
Method Summary
Modifier and TypeMethodDescriptionstatic VMOption
from
(CompositeData cd) Returns aVMOption
object represented by the givenCompositeData
.getName()
Returns the name of this VM option.Returns the origin of the value of this VM option.getValue()
Returns the value of this VM option at the time when thisVMOption
was created.boolean
Tests if this VM option is writeable.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Modifier and TypeMethodDescriptionprotected Object
clone()
Creates and returns a copy of this object.boolean
Indicates whether some other object is "equal to" this one.protected void
finalize()
Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class
<?> getClass()
Returns the runtime class of thisObject
.int
hashCode()
Returns a hash code value for this object.final void
notify()
Wakes up a single thread that is waiting on this object's monitor.final void
Wakes up all threads that are waiting on this object's monitor.toString()
Returns a string representation of the object.final void
wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final void
wait
(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final void
wait
(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
VMOption
Constructs aVMOption
.- Parameters:
name
- Name of a VM option.value
- Value of a VM option.writeable
-true
if a VM option can be set dynamically, orfalse
otherwise.origin
- where the value of a VM option came from.- Throws:
NullPointerException
- if the name or value isnull
-
-
Method Details
-
getName
-
getValue
Returns the value of this VM option at the time when thisVMOption
was created. The value could have been changed.- Returns:
- the value of the VM option at the time when
this
VMOption
was created.
-
getOrigin
Returns the origin of the value of this VM option. That is, where the value of this VM option came from.- Returns:
- where the value of this VM option came from.
-
isWriteable
public boolean isWriteable()Tests if this VM option is writeable. If this VM option is writeable, it can be set by theHotSpotDiagnosticMXBean.setVMOption
method.- Returns:
true
if this VM option is writeable;false
otherwise.
-
from
Returns aVMOption
object represented by the givenCompositeData
. The givenCompositeData
must contain the following attributes:Attribute Name Type name java.lang.String
value java.lang.String
origin java.lang.String
writeable java.lang.Boolean
- Parameters:
cd
-CompositeData
representing aVMOption
- Returns:
- a
VMOption
object represented bycd
ifcd
is notnull
;null
otherwise. - Throws:
IllegalArgumentException
- ifcd
does not represent aVMOption
with the attributes described above.
-