< prev index next >

src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java

Print this page

        

@@ -59,10 +59,12 @@
 
     private final PlatformRecorder recorder;
     private final long id;
     // Recording settings
     private Map<String, String> settings = new LinkedHashMap<>();
+    private List<String> configNames;
+    private Duration delay;
     private Duration duration;
     private Duration maxAge;
     private long maxSize;
 
     private WriteableUserPath destination;

@@ -179,10 +181,11 @@
 
     public void scheduleStart(Duration delay) {
         synchronized (recorder) {
             ensureOkForSchedule();
 
+            this.delay = delay;
             startTime = Instant.now().plus(delay);
             LocalDateTime now = LocalDateTime.now().plus(delay);
             setState(RecordingState.DELAYED);
             startTask = createStartTask();
             recorder.getTimer().schedule(startTask, delay.toMillis());

@@ -220,16 +223,24 @@
             startTask = createStartTask();
             recorder.getTimer().schedule(startTask, startTime.toEpochMilli());
         }
     }
 
+    public Duration getDelay() {
+        return delay;
+    }
+
     public Map<String, String> getSettings() {
         synchronized (recorder) {
             return settings;
         }
     }
 
+    public List<String> getConfigNames() {
+        return configNames;
+    }
+
     public long getSize() {
         return size;
     }
 
     public Instant getStopTime() {

@@ -467,10 +478,14 @@
                 recorder.updateSettings();
             }
         }
     }
 
+    public void setConfigNames(List<String> configNames) {
+        this.configNames = configNames;
+    }
+
     private void notifyIfStateChanged(RecordingState newState, RecordingState oldState) {
         if (oldState == newState) {
             return;
         }
         for (FlightRecorderListener cl : PlatformRecorder.getListeners()) {
< prev index next >