| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final Map | |
| private final List | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final List | |
| private FlightRecorder | |
| private final AtomicLong | |
| private final StreamManager |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
Overrides javax. Implements javax. Adds a listener to this MBean. |
| public long | cloneRecording(long id, boolean stop)
Implements jdk. Creates a copy of an existing recording, useful for extracting parts of a recording. |
| public void | closeRecording(long id)
Implements jdk. Closes the recording with the specified ID and releases any system resources that are associated with the recording. |
| public void | closeStream(long streamIdentifier)
Implements jdk. Closes the recording stream with the specified ID and releases any system resources that are associated with the stream. |
| public void | copyTo(long recording, String outputFile)
Implements jdk. Writes recording data to the specified file. |
| private Notification | |
| private static MBeanNotificationInfo[] | |
| public List | getConfigurations()
Implements jdk. Returns the list of predefined configurations for this Java Virtual Machine (JVM). |
| public List | getEventTypes()
Implements jdk. Returns the list of currently registered event types. |
| private Recording | |
| public ObjectName | getObjectName()
Implements java. Returns an |
| private FlightRecorder | |
| private Recording | |
| public Map | getRecordingOptions(long recording)
Implements jdk. Returns a map that contains the options for the recording with the specified ID (for example, the destination file or time span to keep recorded data). |
| public List | getRecordings()
Implements jdk. Returns the list of available recordings, not necessarily running. |
| public Map | getRecordingSettings(long recording)
Implements jdk. Returns a
If multiple recordings are running at the same time, more data could be
recorded than what is specified in the |
| public long | newRecording()
Implements jdk. Creates a recording, but doesn't start it. |
| public long | openStream(long id, Map<String, String> options)
Implements jdk. Opens a data stream for the recording with the specified ID, or |
| public byte[] | readStream(long streamIdentifier)
Implements jdk. Reads a portion of data from the stream with the specified ID, or returns
|
| private void | |
| public void | removeNotificationListener(NotificationListener listener)
Overrides javax. Implements javax. Removes a listener from this MBean. |
| public void | removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
Overrides javax. Implements javax. Removes a listener from this MBean. |
| public void | setConfiguration(long recording, String contents)
Implements jdk. Sets a configuration as a string representation for the recording with the specified ID. |
| private static <T, U> void | |
| private static void | |
| public void | setPredefinedConfiguration(long recording, String configurationName)
Implements jdk. Sets a predefined configuration for the recording with the specified ID. |
| public void | setRecordingOptions(long recording, Map<String, String> options)
Implements jdk. Configures the recording options (for example, destination file and time span to keep data). |
| public void | setRecordingSettings(long recording, Map<String, String> settings)
Implements jdk. Sets and replaces all previous settings for the specified recording. |
| public void | startRecording(long id)
Implements jdk. Starts the recording with the specified ID. A recording that is stopped can't be restarted. |
| public boolean | stopRecording(long id)
Implements jdk. Stops the running recording with the specified ID. |
| public long | takeSnapshot()
Implements jdk. Creates a snapshot recording of all available recorded data. |
| private static <T, U> void |
| ATTRIBUTE_RECORDINGS | back to summary |
|---|---|
| private static final String ATTRIBUTE_RECORDINGS | |
| changes | back to summary |
|---|---|
| private final Map<Long, Object> changes | |
| listeners | back to summary |
|---|---|
| private final List<FlightRecorderMXBeanImpl. | |
| OPTION_DESTINATION | back to summary |
|---|---|
| private static final String OPTION_DESTINATION | |
| OPTION_DISK | back to summary |
|---|---|
| private static final String OPTION_DISK | |
| OPTION_DUMP_ON_EXIT | back to summary |
|---|---|
| private static final String OPTION_DUMP_ON_EXIT | |
| OPTION_DURATION | back to summary |
|---|---|
| private static final String OPTION_DURATION | |
| OPTION_MAX_AGE | back to summary |
|---|---|
| private static final String OPTION_MAX_AGE | |
| OPTION_MAX_SIZE | back to summary |
|---|---|
| private static final String OPTION_MAX_SIZE | |
| OPTION_NAME | back to summary |
|---|---|
| private static final String OPTION_NAME | |
| OPTIONS | back to summary |
|---|---|
| private static final List<String> OPTIONS | |
| recorder | back to summary |
|---|---|
| private FlightRecorder recorder | |
| sequenceNumber | back to summary |
|---|---|
| private final AtomicLong sequenceNumber | |
| streamHandler | back to summary |
|---|---|
| private final StreamManager streamHandler | |
| FlightRecorderMXBeanImpl | back to summary |
|---|---|
| pack-priv FlightRecorderMXBeanImpl() | |
| addNotificationListener | back to summary |
|---|---|
| public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Overrides javax. Implements javax. Doc from javax. Adds a listener to this MBean.
| |
| cloneRecording | back to summary |
|---|---|
| public long cloneRecording(long id, boolean stop) throws IllegalStateException Implements jdk. Doc from jdk. Creates a copy of an existing recording, useful for extracting parts of a recording.
The cloned recording contains the same recording data as the
original, but it has a new ID and a name prefixed with
| |
| closeRecording | back to summary |
|---|---|
| public void closeRecording(long id) Implements jdk. Doc from jdk. Closes the recording with the specified ID and releases any system resources that are associated with the recording. If the recording is already closed, invoking this method has no effect.
| |
| closeStream | back to summary |
|---|---|
| public void closeStream(long streamIdentifier) throws IOException Implements jdk. Doc from jdk. Closes the recording stream with the specified ID and releases any system resources that are associated with the stream. If the stream is already closed, invoking this method has no effect.
| |
| copyTo | back to summary |
|---|---|
| public void copyTo(long recording, String outputFile) throws IOException Implements jdk. Doc from jdk. Writes recording data to the specified file.
If this method is invoked remotely from another process, the data is written
to a file named
| |
| createNotification | back to summary |
|---|---|
| private Notification createNotification(Recording recording) | |
| createNotificationInfo | back to summary |
|---|---|
| private static MBeanNotificationInfo[] createNotificationInfo() | |
| getConfigurations | back to summary |
|---|---|
| public List Implements jdk. Doc from jdk. Returns the list of predefined configurations for this Java Virtual Machine (JVM).
MBeanServer access:
| |
| getEventTypes | back to summary |
|---|---|
| public List Implements jdk. Doc from jdk. Returns the list of currently registered event types.
MBeanServer access:
| |
| getExistingRecording | back to summary |
|---|---|
| private Recording getExistingRecording(long id) | |
| getObjectName | back to summary |
|---|---|
| public ObjectName getObjectName() Implements java. Doc from java. Returns an
| |
| getRecorder | back to summary |
|---|---|
private FlightRecorder getRecorder()
| |
| getRecording | back to summary |
|---|---|
| private Recording getRecording(long id) | |
| getRecordingOptions | back to summary |
|---|---|
| public Map Implements jdk. Doc from jdk. Returns a map that contains the options for the recording with the specified ID (for example, the destination file or time span to keep recorded data).
See
| |
| getRecordings | back to summary |
|---|---|
| public List Implements jdk. Doc from jdk. Returns the list of available recordings, not necessarily running.
MBeanServer access:
| |
| getRecordingSettings | back to summary |
|---|---|
| public Map Implements jdk. Doc from jdk. Returns a
If multiple recordings are running at the same time, more data could be
recorded than what is specified in the
The name in the
| |
| newRecording | back to summary |
|---|---|
| public long newRecording() Implements jdk. Doc from jdk. Creates a recording, but doesn't start it.
| |
| openStream | back to summary | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public long openStream(long id, Map<String, String> options) throws IOException Implements jdk. Doc from jdk. Opens a data stream for the recording with the specified ID, or
The recording with the specified ID must be stopped before a stream can
be opened, unless the option
| ||||||||||||||||||||||||||
| readStream | back to summary |
|---|---|
| public byte[] readStream(long streamIdentifier) throws IOException Implements jdk. Doc from jdk. Reads a portion of data from the stream with the specified ID, or returns
To read all data for a recording, invoke this method repeatedly until
| |
| removeListeners | back to summary |
|---|---|
| private void removeListeners(Predicate<FlightRecorderMXBeanImpl. | |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException Overrides javax. Implements javax. Doc from javax. Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.
| |
| removeNotificationListener | back to summary |
|---|---|
| public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException Overrides javax. Implements javax. Doc from javax. Removes a listener from this MBean. The MBean must have a
listener that exactly matches the given The
| |
| setConfiguration | back to summary |
|---|---|
| public void setConfiguration(long recording, String contents) throws IllegalArgumentException Implements jdk. Doc from jdk. Sets a configuration as a string representation for the recording with the specified ID.
| |
| setOption | back to summary |
|---|---|
| private static <T, U> void setOption(Map<String, String> options, String name, String defaultValue, Function<String, U> converter, Consumer<U> setter) | |
| setOptionDestination | back to summary |
|---|---|
| private static void setOptionDestination(Recording recording, String destination) | |
| setPredefinedConfiguration | back to summary |
|---|---|
| public void setPredefinedConfiguration(long recording, String configurationName) throws IllegalArgumentException Implements jdk. Doc from jdk. Sets a predefined configuration for the recording with the specified ID.
| |
| setRecordingOptions | back to summary |
|---|---|
| public void setRecordingOptions(long recording, Map<String, String> options) throws IllegalArgumentException Implements jdk. Doc from jdk. Configures the recording options (for example, destination file and time span to keep data).
See
| |
| setRecordingSettings | back to summary |
|---|---|
| public void setRecordingSettings(long recording, Map<String, String> settings) throws IllegalArgumentException Implements jdk. Doc from jdk. Sets and replaces all previous settings for the specified recording. A setting consists of a name/value pair, where name specifies the event and setting to configure, and the value specifies what to set it to. The name can be formed in the following ways:
or
For example, to set the sample interval of the CPU Load event to once every
second, use the name
A list of available event names is retrieved by invoking
| |
| startRecording | back to summary |
|---|---|
| public void startRecording(long id) Implements jdk. Doc from jdk. Starts the recording with the specified ID. A recording that is stopped can't be restarted.
| |
| stopRecording | back to summary |
|---|---|
| public boolean stopRecording(long id) Implements jdk. Doc from jdk. Stops the running recording with the specified ID.
| |
| takeSnapshot | back to summary |
|---|---|
| public long takeSnapshot() Implements jdk. Doc from jdk. Creates a snapshot recording of all available recorded data.
A snapshot is a synthesized recording in a stopped state. If no data is
available, a recording with size A snapshot provides stable access to data for later operations (for example, operations to change the time interval or to reduce the data size). The caller must close the recording when access to the data is no longer needed.
| |
| validateOption | back to summary |
|---|---|
| private static <T, U> void validateOption(Map<String, String> options, String name, Function<String, U> validator) | |
| Modifier and Type | Field and Description |
|---|---|
| private final NotificationFilter | |
| private final Object | |
| private final NotificationListener |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | recordingStateChanged(Recording recording)
Overrides default jdk. Receives notification when the state of a recording changes. |
| filter | back to summary |
|---|---|
| private final NotificationFilter filter | |
| handback | back to summary |
|---|---|
| private final Object handback | |
| listener | back to summary |
|---|---|
| private final NotificationListener listener | |
| MXBeanListener | back to summary |
|---|---|
| public MXBeanListener(NotificationListener listener, NotificationFilter filter, Object handback) | |
| recordingStateChanged | back to summary |
|---|---|
| public void recordingStateChanged(Recording recording) Overrides default jdk. Doc from jdk. Receives notification when the state of a recording changes.
Callback is invoked when a recording reaches the | |