equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package jdk.management.jfr; |
26 package jdk.management.jfr; |
27 |
27 |
28 import java.nio.file.Path; |
|
29 import java.time.Duration; |
28 import java.time.Duration; |
30 import java.time.Instant; |
29 import java.time.Instant; |
31 import java.util.LinkedHashMap; |
30 import java.util.LinkedHashMap; |
32 import java.util.List; |
31 import java.util.List; |
33 import java.util.Map; |
32 import java.util.Map; |
35 import javax.management.openmbean.CompositeData; |
34 import javax.management.openmbean.CompositeData; |
36 import javax.management.openmbean.TabularData; |
35 import javax.management.openmbean.TabularData; |
37 |
36 |
38 import jdk.jfr.Recording; |
37 import jdk.jfr.Recording; |
39 import jdk.jfr.RecordingState; |
38 import jdk.jfr.RecordingState; |
|
39 import jdk.jfr.internal.management.ManagementSupport; |
40 |
40 |
41 /** |
41 /** |
42 * Management representation of a {@code Recording}. |
42 * Management representation of a {@code Recording}. |
43 * |
43 * |
44 * @see Recording |
44 * @see Recording |
78 maxSize = recording.getMaxSize(); |
78 maxSize = recording.getMaxSize(); |
79 Instant s = recording.getStartTime(); |
79 Instant s = recording.getStartTime(); |
80 startTime = s == null ? 0L : s.toEpochMilli(); |
80 startTime = s == null ? 0L : s.toEpochMilli(); |
81 Instant st = recording.getStopTime(); |
81 Instant st = recording.getStopTime(); |
82 stopTime = st == null ? 0L : st.toEpochMilli(); |
82 stopTime = st == null ? 0L : st.toEpochMilli(); |
83 Path p = recording.getDestination(); |
83 destination = ManagementSupport.getDestinationOriginalText(recording); |
84 destination = p == null ? null : p.toString(); |
|
85 Duration duration = recording.getDuration(); |
84 Duration duration = recording.getDuration(); |
86 durationInSeconds = duration == null ? 0 : duration.getSeconds(); |
85 durationInSeconds = duration == null ? 0 : duration.getSeconds(); |
87 settings = recording.getSettings(); |
86 settings = recording.getSettings(); |
88 } |
87 } |
89 |
88 |