public final class RecordingInfo extends Object
Recording
.Modifier and Type | Method | Description |
---|---|---|
static RecordingInfo |
from |
Returns a RecordingInfo represented by the specified CompositeData object. |
String |
getDestination() |
Returns destination path where data, for the recording associated with this RecordingInfo , should be written when the recording stops, or null if the recording should not be written. |
boolean |
getDumpOnExit() |
Returns if the recording associated with this RecordingInfo should be dumped to file when the JVM exits. |
long |
getDuration() |
Returns the desired duration, measured in seconds, of the recording associated with this RecordingInfo , or 0 if no duration has been set. |
long |
getId() |
Returns the unique ID for the recording associated with this RecordingInfo . |
long |
getMaxAge() |
Returns how many seconds data should be kept on disk, or 0 if data is to be kept forever. |
long |
getMaxSize() |
Returns the amount of data, measured in bytes, the recording associated with this RecordingInfo , should be kept on disk, before it's rotated away, or 0 if data is to be kept indefinitely. |
String |
getName() |
Returns the name of the recording associated with this RecordingInfo . |
Map |
getSettings() |
Returns the settings for the recording associated with this RecordingInfo . |
long |
getSize() |
Returns the amount data recorded by recording. associated with this RecordingInfo . |
long |
getStartTime() |
Returns start time of the recording associated with this RecordingInfo , measured as ms since epoch, or null if the recording hasn't started. |
String |
getState() |
Returns a String representation of state of the recording associated with this RecordingInfo . |
long |
getStopTime() |
Returns the actual or expected stop time of the recording associated with this RecordingInfo , measured as ms since epoch, or null if the expected or actual stop time is not known, which can only happen if the recording has not yet been stopped. |
boolean |
isToDisk() |
Returns true if the recording associated with this RecordingInfo should be flushed to disk, when memory buffers are full, false otherwise. |
String |
toString() |
Returns a string description of the recording associated with this RecordingInfo
|
public String getName()
RecordingInfo
.null
public long getId()
RecordingInfo
.public boolean getDumpOnExit()
RecordingInfo
should be dumped to file when the JVM exits.true
if recording should be dumped on exit, false
otherwisepublic long getMaxAge()
0
if data is to be kept forever. In-memory recordings are not affected by maximum age.
public long getMaxSize()
RecordingInfo
, should be kept on disk, before it's rotated away, or 0
if data is to be kept indefinitely. In-memory recordings are not affected by maximum size.
public String getState()
String
representation of state of the recording associated with this RecordingInfo
. Valid return values are "NEW"
, "DELAYED"
, "STARTING"
, "RUNNING"
, "STOPPING"
, "STOPPED"
and "CLOSED"
.
null
public long getStartTime()
RecordingInfo
, measured as ms since epoch, or null
if the recording hasn't started.null
if the recording hasn't startedpublic long getStopTime()
RecordingInfo
, measured as ms since epoch, or null
if the expected or actual stop time is not known, which can only happen if the recording has not yet been stopped.null
if recording hasn't been stopped.public Map<String,String> getSettings()
RecordingInfo
.null
public String getDestination()
RecordingInfo
, should be written when the recording stops, or null
if the recording should not be written.null
if not setpublic String toString()
RecordingInfo
public long getSize()
RecordingInfo
.public boolean isToDisk()
true
if the recording associated with this RecordingInfo
should be flushed to disk, when memory buffers are full, false
otherwise.true
if recording is to disk, false
otherwisepublic long getDuration()
RecordingInfo
, or 0
if no duration has been set.0
if no duration has been setpublic static RecordingInfo from(CompositeData cd)
RecordingInfo
represented by the specified CompositeData
object. The specified CompositeData
must have the following item names and item types to be valid.
Supported names and types in a specified CompositeData
objectName Type id Long
name String
state String
dumpOnExit Boolean
size Long
toDisk Boolean
maxAge Long
maxSize Long
startTime Long
stopTime Long
destination String
duration Long
settings javax.management.openmbean.CompositeData[]
whose element type is the mapped type forSettingDescriptorInfo
as specified in theSettingDescriptorInfo.from(javax.management.openmbean.CompositeData)
method.
cd
- CompositeData
representing the RecordingInfo
to returnRecordingInfo
represented by cd
, or null
if cd
is null
IllegalArgumentException
- if cd
does not represent a valid RecordingInfo
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.management.jfr/jdk/management/jfr/RecordingInfo.html