Class FlightRecorder


  • public class FlightRecorder
    extends Object
    • Method Detail

      • startRecording

        public void startRecording​(long recordingId,
                                   Duration delayDuration)
      • stopRecording

        public File stopRecording​(long recordingId)
      • cleanupOldRecordings

        @Scheduled(fixedDelayString="${flightrecorder.recording-cleanup-interval}")
        public void cleanupOldRecordings()
      • getDeletableRecordingsByTTL

        protected Set<Long> getDeletableRecordingsByTTL()
        Return finished recordings with startTime older than (Instant.now() - TTL)
        Returns:
        Set of recording IDs to be deleted
      • getDeletableRecordingsByCount

        protected Set<Long> getDeletableRecordingsByCount()
        If the total number of recordings is above the threshold defined in flightrecorder.old-recordings-max, returns the oldest recordings that are above the threshold and finished.
        Returns:
        Set of recording IDs to be deleted
      • deleteRecording

        public void deleteRecording​(long recordingId)
      • isRecordingStopped

        public boolean isRecordingStopped​(long recordingId)