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 Recording
newRecording(File path)
Create a new recording that will be automatically stored in the given file.static Recording
newRecording(File path, Consumer<RecordingSettingsBuilder> settingsCallback)
Create a new recording that will be automatically stored in the given file.static Recording
newRecording(OutputStream recordingStream)
Create a new recording that will be automatically stored in the given stream.static Recording
newRecording(OutputStream recordingStream, Consumer<RecordingSettingsBuilder> settingsCallback)
Create a new recording that will be automatically stored in the given stream.static Recording
newRecording(String path)
Create a new recording that will be automatically stored in the given file.static Recording
newRecording(String path, Consumer<RecordingSettingsBuilder> settingsCallback)
Create a new recording that will be automatically stored in the given file.static Recording
newRecording(Path path)
Create a new recording that will be automatically stored in the given path.static Recording
newRecording(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
-
-