An EventSettings object for a recording can be obtained by invoking
the Recording#enable(String) method which is configured using method
chaining.
The following example shows how to use the EventSettings class.
try (Recording r = new Recording()) { r.enable("jdk.CPULoad") .withPeriod(Duration.ofSeconds(1)); r.enable("jdk.FileWrite") .withoutStackTrace() .withThreshold(Duration.ofNanos(10)); r.start(); Thread.sleep(10_000); r.stop(); r.dump(Files.createTempFile("recording", ".jfr")); }
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract Map | Returns: a settingsMap, not nullCreates a settings |
| public abstract EventSettings | |
| public final EventSettings | Returns: event settings object for further configuration, notnullDisables stack traces for the event that is associated with this event setting. |
| public final EventSettings | Returns: event settings object for further configuration, notnullSpecifies that a threshold is not used. |
| public final EventSettings | Returns: event settings object for further configuration, notnullthe duration, not duration)nullSets the interval for the event that is associated with this event setting. |
| public final EventSettings | Returns: event settings object for further configuration, notnullEnables stack traces for the event that is associated with this event setting. |
| public final EventSettings | Returns: event settings object for further configuration, notnullthe duration, or duration)null if no duration is usedSets the threshold for the event that is associated with this event setting. |
| EventSettings | back to summary |
|---|---|
| pack-priv EventSettings() | |
| toMap | back to summary |
|---|---|
| pack-priv abstract Map Creates a settings | |
| with | back to summary |
|---|---|
| public abstract EventSettings with(String name, String value) Sets a setting value for the event that is associated with this event setting.
| |
| withoutStackTrace | back to summary |
|---|---|
| public final EventSettings withoutStackTrace() Disables stack traces for the event that is associated with this event setting.
Equivalent to invoking the
| |
| withoutThreshold | back to summary |
|---|---|
| public final EventSettings withoutThreshold() Specifies that a threshold is not used.
This is a convenience method, equivalent to invoking the
| |
| withPeriod | back to summary |
|---|---|
| public final EventSettings withPeriod(Duration duration) Sets the interval for the event that is associated with this event setting.
| |
| withStackTrace | back to summary |
|---|---|
| public final EventSettings withStackTrace() Enables stack traces for the event that is associated with this event setting.
Equivalent to invoking the
| |
| withThreshold | back to summary |
|---|---|
| public final EventSettings withThreshold(Duration duration) Sets the threshold for the event that is associated with this event setting.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final EventSettingsModifier |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Map | toMap()
Implements abstract jdk. Creates a settings |
| public EventSettings | with(String name, String value)
Implements abstract jdk. Sets a setting value for the event that is associated with this event setting. |
| delegate | back to summary |
|---|---|
| private final EventSettingsModifier delegate | |
| DelegatedEventSettings | back to summary |
|---|---|
| pack-priv DelegatedEventSettings(EventSettingsModifier modifier) | |
| toMap | back to summary |
|---|---|
| pack-priv Map Implements abstract jdk. Doc from jdk. Creates a settings
| |
| with | back to summary |
|---|---|
| public EventSettings with(String name, String value) Implements abstract jdk. Doc from jdk. Sets a setting value for the event that is associated with this event setting.
| |
| Access | Constructor and Description |
|---|---|
| private |
| InternalAccess | back to summary |
|---|---|
| private InternalAccess() | |
| getFieldName | back to summary |
|---|---|
| public String getFieldName(ValueDescriptor v) Implements abstract jdk.
| |
| getPlatformEventType | back to summary |
|---|---|
| public PlatformEventType getPlatformEventType(EventType eventType) Implements abstract jdk.
| |
| getPlatformRecorder | back to summary |
|---|---|
| public PlatformRecorder getPlatformRecorder() Implements abstract jdk.
| |
| getPlatformRecording | back to summary |
|---|---|
| public PlatformRecording getPlatformRecording(Recording r) Implements abstract jdk.
| |
| getType | back to summary |
|---|---|
| public Type getType(Object o) Implements abstract jdk.
| |
| isConstantPool | back to summary |
|---|---|
| public boolean isConstantPool(ValueDescriptor v) Implements abstract jdk.
| |
| isUnsigned | back to summary |
|---|---|
| public boolean isUnsigned(ValueDescriptor v) Implements abstract jdk.
| |
| isVisible | back to summary |
|---|---|
| public boolean isVisible(EventType t) Implements abstract jdk.
| |
| newAnnotation | back to summary |
|---|---|
| public AnnotationElement newAnnotation(Type annotationType, List<Object> values, boolean boot) Implements abstract jdk.
| |
| newConfiguration | back to summary |
|---|---|
| public Configuration newConfiguration(String name, String label, String description, String provider, Map<String, String> settings, String contents) Implements abstract jdk.
| |
| newEventSettings | back to summary |
|---|---|
| public EventSettings newEventSettings(EventSettingsModifier esm) Implements abstract jdk.
| |
| newEventType | back to summary |
|---|---|
| public EventType newEventType(PlatformEventType platformEventType) Implements abstract jdk.
| |
| newRecording | back to summary |
|---|---|
| public Recording newRecording(Boolean register) Implements abstract jdk.
| |
| newSettingDescriptor | back to summary |
|---|---|
| public SettingDescriptor newSettingDescriptor(Type type, String name, String defaultValue, List<AnnotationElement> annotations) Implements abstract jdk.
| |
| newValueDescriptor | back to summary |
|---|---|
| public ValueDescriptor newValueDescriptor(String name, Type fieldType, List<AnnotationElement> annos, int dimension, boolean constantPool, String fieldName) Implements abstract jdk.
| |
| newValueDescriptor | back to summary |
|---|---|
| public ValueDescriptor newValueDescriptor(Class<?> type, String name) Implements abstract jdk.
| |
| setAnnotations | back to summary |
|---|---|
| public void setAnnotations(ValueDescriptor v, List<AnnotationElement> a) Implements abstract jdk.
| |
| setAnnotations | back to summary |
|---|---|
| public void setAnnotations(SettingDescriptor s, List<AnnotationElement> a) Implements abstract jdk.
| |