APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.jfr.internal

public final Class EventControl

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.Constructor, .InvocationTargetException, .Method, .Modifier, java.util.ArrayList, .Collections, .List, jdk.internal.module.Checks, .Modules, jdk.jfr.AnnotationElement, .Enabled, .Name, .Period, .SettingControl, .SettingDefinition, .StackTrace, .Threshold, .Throttle, jdk.jfr.events.ActiveSettingEvent, .StackFilter, jdk.jfr.internal.settings.CutoffSetting, .EnabledSetting, .LevelSetting, .MethodSetting, .PeriodSetting, .CPUThrottleSetting, .StackTraceSetting, .ThresholdSetting, .ThrottleSetting, .Throttler, jdk.jfr.internal.tracing.Modification, jdk.jfr.internal.util.Utils

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static record

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private final String
private final ArrayList<EventControl.NamedControl>
private final ArrayList<SettingControl>
private static final long
private final PlatformEventType
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type
private static final Type

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
EventControl(PlatformEventType es, Class<? extends Event> eventClass)

Method Summary

Modifier and TypeMethod and Description
private void
addControl(String name, Control control)

private void
private static Control
private static Control
private static Control
private Control
private static Control
private void
defineSetting(Class<? extends SettingControl> settingsClass, Method method, PlatformEventType eventType, String settingName)

private void
defineSettings(Class<?> eventClass)

private static Control
private static Control
private static Control
pack-priv void
private Constructor<?>
findDefaultConstructor(Class<? extends SettingControl> settingControlClass)

public PlatformEventType
public ArrayList<EventControl.NamedControl>
public List<SettingControl>
public String
private String[]
private boolean
private SettingControl
instantiateSettingControl(Class<? extends SettingControl> settingControlClass)

private boolean
private boolean
isValidType(String className)

pack-priv static void
pack-priv void
writeActiveSettingEvent(long timestamp)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FIELD_SETTING_PREFIXback to summary
pack-priv static final String FIELD_SETTING_PREFIX
idNameback to summary
private final String idName
namedControlsback to summary
private final ArrayList<EventControl.NamedControl> namedControls
settingControlsback to summary
private final ArrayList<SettingControl> settingControls
STACK_FILTER_IDback to summary
private static final long STACK_FILTER_ID
typeback to summary
private final PlatformEventType type
TYPE_CUTOFFback to summary
private static final Type TYPE_CUTOFF
TYPE_ENABLEDback to summary
private static final Type TYPE_ENABLED
TYPE_LEVELback to summary
private static final Type TYPE_LEVEL
TYPE_METHOD_FILTERback to summary
private static final Type TYPE_METHOD_FILTER
TYPE_PERIODback to summary
private static final Type TYPE_PERIOD
TYPE_STACK_TRACEback to summary
private static final Type TYPE_STACK_TRACE
TYPE_THRESHOLDback to summary
private static final Type TYPE_THRESHOLD
TYPE_THROTTLEback to summary
private static final Type TYPE_THROTTLE

Constructor Detail

EventControlback to summary
pack-priv EventControl(PlatformEventType eventType)
EventControlback to summary
pack-priv EventControl(PlatformEventType es, Class<? extends Event> eventClass)

Method Detail

addControlback to summary
private void addControl(String name, Control control)
addStackFiltersback to summary
private void addStackFilters(PlatformEventType eventType)
defineCutoffback to summary
private static Control defineCutoff(PlatformEventType type)
defineEnabledback to summary
private static Control defineEnabled(PlatformEventType type)
defineLevelback to summary
private static Control defineLevel(PlatformEventType type)
defineMethodFilterback to summary
private Control defineMethodFilter(PlatformEventType type, Modification modification)
definePeriodback to summary
private static Control definePeriod(PlatformEventType type)
defineSettingback to summary
private void defineSetting(Class<? extends SettingControl> settingsClass, Method method, PlatformEventType eventType, String settingName)
defineSettingsback to summary
private void defineSettings(Class<?> eventClass)
Annotations
@SuppressWarnings:unchecked
defineStackTraceback to summary
private static Control defineStackTrace(PlatformEventType type)
defineThresholdback to summary
private static Control defineThreshold(PlatformEventType type)
defineThrottleback to summary
private static Control defineThrottle(PlatformEventType type)
disableback to summary
pack-priv void disable()
findDefaultConstructorback to summary
private Constructor<?> findDefaultConstructor(Class<? extends SettingControl> settingControlClass)
getEventTypeback to summary
public PlatformEventType getEventType()
getNamedControlsback to summary
public ArrayList<EventControl.NamedControl> getNamedControls()
getSettingControlsback to summary
public List<SettingControl> getSettingControls()
getSettingsIdback to summary
public String getSettingsId()
getStackFilterback to summary
private String[] getStackFilter(PlatformEventType eventType)
hasControlback to summary
private boolean hasControl(String name)
instantiateSettingControlback to summary
private SettingControl instantiateSettingControl(Class<? extends SettingControl> settingControlClass) throws IllegalAccessException, InstantiationException
isValidMethodback to summary
private boolean isValidMethod(String method)
isValidTypeback to summary
private boolean isValidType(String className)
removeback to summary
pack-priv static void remove(PlatformEventType type, List<AnnotationElement> aes, Class<? extends Annotation> clazz)
writeActiveSettingEventback to summary
pack-priv void writeActiveSettingEvent(long timestamp)
jdk.jfr.internal back to summary

pack-priv final Record EventControl.NamedControl

extends Record
Class Inheritance
Record Components
name:String 
control:Control 

Field Summary

Modifier and TypeField and Description
private final Control
control

Record Component accessed by control().

private final String
name

Record Component accessed by name().

Constructor Summary

AccessConstructor and Description
pack-priv
NamedControl(String name, Control control)

Method Summary

Modifier and TypeMethod and Description
public Control
control()

Record Component getter of control.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public String
name()

Record Component getter of name.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

controlback to summary
private final Control control

Record Component accessed by control().

nameback to summary
private final String name

Record Component accessed by name().

Constructor Detail

NamedControlback to summary
pack-priv NamedControl(String name, Control control)

Method Detail

controlback to summary
public Control control()

Record Component getter of control.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

nameback to summary
public String name()

Record Component getter of name.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.