Package org.apache.camel.spi
Interface StartupStepRecorder
-
- All Superinterfaces:
AutoCloseable
,Service
,StaticService
public interface StartupStepRecorder extends StaticService
To recordStartupStep
during startup to allow to capture diagnostic information to help troubleshoot Camel applications via various tooling such as Java Flight Recorder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StartupStep
beginStep(Class<?> type, String name, String description)
Beings a new step.void
endStep(StartupStep step)
Ends the stepint
getMaxDepth()
To filter our sub steps at a maximum depthString
getRecordingDir()
String
getRecordingProfile()
long
getStartupRecorderDuration()
How long time to run the startup recorder.boolean
isEnabled()
Whether recording is enabledboolean
isRecording()
Whether to start flight recorder recording.void
setEnabled(boolean enabled)
Whether recording is enabledvoid
setMaxDepth(int level)
To filter our sub steps at a maximum depthvoid
setRecording(boolean recording)
Whether to start flight recorder recording.void
setRecordingDir(String recordingDir)
Directory to store the recording.void
setRecordingProfile(String profile)
To use a specific Java Flight Recorder profile configuration, such as default or profile.void
setStartupRecorderDuration(long startupRecorderDuration)
How long time to run the startup recorder.
-
-
-
Field Detail
-
FACTORY
static final String FACTORY
Service factory key.- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Whether recording is enabled
-
setEnabled
void setEnabled(boolean enabled)
Whether recording is enabled
-
getStartupRecorderDuration
long getStartupRecorderDuration()
How long time to run the startup recorder. Use 0 (default) to stop the recorder after Camel has been started. Use -1 to keep the recorder running until Camel is being stopped. A positive value is to run the recorder for N seconds.
-
setStartupRecorderDuration
void setStartupRecorderDuration(long startupRecorderDuration)
How long time to run the startup recorder. Use 0 (default) to stop the recorder after Camel has been started. Use -1 to keep the recorder running until Camel is being stopped. A positive value is to run the recorder for N seconds.
-
getRecordingDir
String getRecordingDir()
-
setRecordingDir
void setRecordingDir(String recordingDir)
Directory to store the recording. By default the current directory will be used.
-
getRecordingProfile
String getRecordingProfile()
-
setRecordingProfile
void setRecordingProfile(String profile)
To use a specific Java Flight Recorder profile configuration, such as default or profile. The default is default.
-
setMaxDepth
void setMaxDepth(int level)
To filter our sub steps at a maximum depth
-
getMaxDepth
int getMaxDepth()
To filter our sub steps at a maximum depth
-
setRecording
void setRecording(boolean recording)
Whether to start flight recorder recording. This is only in use if camel-jfr is being used.
-
isRecording
boolean isRecording()
Whether to start flight recorder recording. This is only in use if camel-jfr is being used.
-
beginStep
StartupStep beginStep(Class<?> type, String name, String description)
Beings a new step.Important must call
endStep(StartupStep)
to end the step.- Parameters:
type
- the sourcename
- name of the stepdescription
- description of the step
-
endStep
void endStep(StartupStep step)
Ends the step
-
-