Class Recordings
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.writer.api.Recordings
-
-
Constructor Summary
Constructors Constructor Description Recordings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RecordingnewRecording(File path)Create a new recording that will be automatically stored in the given file.static RecordingnewRecording(File path, Consumer<RecordingSettingsBuilder> settingsCallback)Create a new recording that will be automatically stored in the given file.static RecordingnewRecording(OutputStream recordingStream)Create a new recording that will be automatically stored in the given stream.static RecordingnewRecording(OutputStream recordingStream, Consumer<RecordingSettingsBuilder> settingsCallback)Create a new recording that will be automatically stored in the given stream.static RecordingnewRecording(String path)Create a new recording that will be automatically stored in the given file.static RecordingnewRecording(String path, Consumer<RecordingSettingsBuilder> settingsCallback)Create a new recording that will be automatically stored in the given file.static RecordingnewRecording(Path path)Create a new recording that will be automatically stored in the given path.static RecordingnewRecording(Path path, Consumer<RecordingSettingsBuilder> settingsCallback)Create a new recording that will be automatically stored in the given path.
-
-
-
Method Detail
-
newRecording
public static Recording newRecording(String path) throws IOException
Create a new recording that will be automatically stored in the given file. The recording start timestamp is set to the current time and the recording will automatically initialize JDK types.- Parameters:
path- the path to the recording file- Returns:
- a new Recording instance
- Throws:
IOException
-
newRecording
public static Recording newRecording(String path, Consumer<RecordingSettingsBuilder> settingsCallback) throws IOException
Create a new recording that will be automatically stored in the given file.- Parameters:
path- the path to the recording filesettingsCallback- settings callback- Returns:
- a new Recording instance
- Throws:
IOException
-
newRecording
public static Recording newRecording(Path path) throws IOException
Create a new recording that will be automatically stored in the given path. The recording start timestamp is set to the current time and the recording will automatically initialize JDK types.- Parameters:
path- the path to the recording file- Returns:
- a new Recording instance
- Throws:
IOException
-
newRecording
public static Recording newRecording(Path path, Consumer<RecordingSettingsBuilder> settingsCallback) throws IOException
Create a new recording that will be automatically stored in the given path.- Parameters:
path- the path to the recording filesettingsCallback- settings callback- Returns:
- a new Recording instance
- Throws:
IOException
-
newRecording
public static Recording newRecording(File path) throws IOException
Create a new recording that will be automatically stored in the given file. The recording start timestamp is set to the current time and the recording will automatically initialize JDK types.- Parameters:
path- the path to the recording file- Returns:
- a new Recording instance
- Throws:
IOException
-
newRecording
public static Recording newRecording(File path, Consumer<RecordingSettingsBuilder> settingsCallback) throws IOException
Create a new recording that will be automatically stored in the given file.- Parameters:
path- the path to the recording filesettingsCallback- settings callback- Returns:
- a new Recording instance
- Throws:
IOException
-
newRecording
public static Recording newRecording(OutputStream recordingStream)
Create a new recording that will be automatically stored in the given stream. The recording start timestamp is set to the current time and the recording will automatically initialize JDK types.- Parameters:
recordingStream- recording output stream- Returns:
- a new Recording instance
-
newRecording
public static Recording newRecording(OutputStream recordingStream, Consumer<RecordingSettingsBuilder> settingsCallback)
Create a new recording that will be automatically stored in the given stream.- Parameters:
recordingStream- recording output streamsettingsCallback- settings callback- Returns:
- a new Recording instance
-
-