java.lang.Object
jdk.management.jfr.RecordingInfo
Management representation of a
Recording
.- Since:
- 9
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic RecordingInfo
from
(CompositeData cd) Returns aRecordingInfo
represented by the specifiedCompositeData
object.Returns destination path where data, for the recording associated with thisRecordingInfo
, should be written when the recording stops, ornull
if the recording should not be written.boolean
Returns if the recording associated with thisRecordingInfo
should be dumped to file when the JVM exits.long
Returns the desired duration, measured in seconds, of the recording associated with thisRecordingInfo
, or0
if no duration has been set.long
getId()
Returns the unique ID for the recording associated with thisRecordingInfo
.long
Returns how many seconds data should be kept on disk, or0
if data is to be kept forever.long
Returns the amount of data, measured in bytes, the recording associated with thisRecordingInfo
, should be kept on disk, before it's rotated away, or0
if data is to be kept indefinitely.getName()
Returns the name of the recording associated with thisRecordingInfo
.Returns the settings for the recording associated with thisRecordingInfo
.long
getSize()
Returns the amount data recorded by recording. associated with thisRecordingInfo
.long
Returns start time of the recording associated with thisRecordingInfo
, measured as ms since epoch, ornull
if the recording hasn't started.getState()
Returns aString
representation of state of the recording associated with thisRecordingInfo
.long
Returns the actual or expected stop time of the recording associated with thisRecordingInfo
, measured as ms since epoch, ornull
if the expected or actual stop time is not known, which can only happen if the recording has not yet been stopped.boolean
isToDisk()
Returnstrue
if the recording associated with thisRecordingInfo
should be flushed to disk, when memory buffers are full,false
otherwise.toString()
Returns a string description of the recording associated with thisRecordingInfo
-
Method Details
-
getName
Returns the name of the recording associated with thisRecordingInfo
.- Returns:
- the recording name, not
null
- See Also:
-
getId
public long getId()Returns the unique ID for the recording associated with thisRecordingInfo
.- Returns:
- the recording ID
- See Also:
-
getDumpOnExit
public boolean getDumpOnExit()Returns if the recording associated with thisRecordingInfo
should be dumped to file when the JVM exits.- Returns:
true
if recording should be dumped on exit,false
otherwise- See Also:
-
getMaxAge
public long getMaxAge()Returns how many seconds data should be kept on disk, or0
if data is to be kept forever.In-memory recordings are not affected by maximum age.
- Returns:
- how long data should be kept on disk, measured in seconds
- See Also:
-
getMaxSize
public long getMaxSize()Returns the amount of data, measured in bytes, the recording associated with thisRecordingInfo
, should be kept on disk, before it's rotated away, or0
if data is to be kept indefinitely.In-memory recordings are not affected by maximum size.
- Returns:
- the amount of data should be kept on disk, in bytes
- See Also:
-
getState
Returns aString
representation of state of the recording associated with thisRecordingInfo
.Valid return values are
"NEW"
,"DELAYED"
,"STARTING"
,"RUNNING"
,"STOPPING"
,"STOPPED"
and"CLOSED"
.- Returns:
- the recording state, not
null
- See Also:
-
getStartTime
public long getStartTime()Returns start time of the recording associated with thisRecordingInfo
, measured as ms since epoch, ornull
if the recording hasn't started.- Returns:
- the start time of the recording, or
null
if the recording hasn't started - See Also:
-
getStopTime
public long getStopTime()Returns the actual or expected stop time of the recording associated with thisRecordingInfo
, measured as ms since epoch, ornull
if the expected or actual stop time is not known, which can only happen if the recording has not yet been stopped.- Returns:
- the stop time of recording, or
null
if recording hasn't been stopped. - See Also:
-
getSettings
-
getDestination
Returns destination path where data, for the recording associated with thisRecordingInfo
, should be written when the recording stops, ornull
if the recording should not be written.- Returns:
- the destination, or
null
if not set - See Also:
-
toString
-
getSize
public long getSize()Returns the amount data recorded by recording. associated with thisRecordingInfo
.- Returns:
- the amount of recorded data, measured in bytes
-
isToDisk
public boolean isToDisk()Returnstrue
if the recording associated with thisRecordingInfo
should be flushed to disk, when memory buffers are full,false
otherwise.- Returns:
true
if recording is to disk,false
otherwise
-
getDuration
public long getDuration()Returns the desired duration, measured in seconds, of the recording associated with thisRecordingInfo
, or0
if no duration has been set.- Returns:
- the desired duration, or
0
if no duration has been set - See Also:
-
from
Returns aRecordingInfo
represented by the specifiedCompositeData
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.- Parameters:
cd
-CompositeData
representing theRecordingInfo
to return- Returns:
- the
RecordingInfo
represented bycd
, ornull
ifcd
isnull
- Throws:
IllegalArgumentException
- ifcd
does not represent a validRecordingInfo
-