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

public final Class PeriodSetting

extends SettingControl
Class Inheritance
Annotations
@MetadataDefinition
@Label:Period
@Description:Record event at interval
@Name:jdk.settings.Period
Imports
java.util.Objects, .Set, jdk.jfr.Description, .Label, .MetadataDefinition, .Name, .SettingControl, jdk.jfr.internal.PlatformEventType, .Type, jdk.jfr.internal.util.ValueParser, .Utils

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
private final String
public static final String
private final PlatformEventType
public static final String
public static final String
private static final long
private String

Constructor Summary

AccessConstructor and Description
public
PeriodSetting(PlatformEventType eventType, String defaultValue)

Method Summary

Modifier and TypeMethod and Description
public String
combine(Set<String> values)

Implements abstract jdk.jfr.SettingControl.combine.

Combines the setting values for all running recordings into one value when multiple recordings are running at the same time,

The semantics of how setting values are combined depends on the setting control that is implemented, but all recordings should get at least all the events they request.

public String
getValue()

Implements abstract jdk.jfr.SettingControl.getValue.

Returns the currently used value for this setting, not null.

public static boolean
isType(long typeId)

public void
setValue(String value)

Implements abstract jdk.jfr.SettingControl.setValue.

Sets the value for this setting.

private String
validPeriod(String userDefault)

Field Detail

BEGIN_CHUNKback to summary
public static final String BEGIN_CHUNK
DEFAULT_VALUEback to summary
public static final String DEFAULT_VALUE
defaultValueback to summary
private final String defaultValue
END_CHUNKback to summary
public static final String END_CHUNK
eventTypeback to summary
private final PlatformEventType eventType
EVERY_CHUNKback to summary
public static final String EVERY_CHUNK
NAMEback to summary
public static final String NAME
typeIdback to summary
private static final long typeId
valueback to summary
private String value

Constructor Detail

PeriodSettingback to summary
public PeriodSetting(PlatformEventType eventType, String defaultValue)

Method Detail

combineback to summary
public String combine(Set<String> values)

Implements abstract jdk.jfr.SettingControl.combine.

Doc from jdk.jfr.SettingControl.combine.

Combines the setting values for all running recordings into one value when multiple recordings are running at the same time,

The semantics of how setting values are combined depends on the setting control that is implemented, but all recordings should get at least all the events they request.

This method should have no side effects, because the caller might cache values. This method should never return null or throw an exception. If a value is not valid for this setting control, the value should be ignored.

Examples:

if the setting control represents a threshold and three recordings are running at the same time with the setting values "10 ms", "8 s", and "1 ms", this method returns "1 ms" because it means that all recordings get at least all the requested data.

If the setting control represents a set of names and two recordings are running at the same time with the setting values "Smith, Jones" and "Jones, Williams" the returned value is "Smith, Jones, Williams" because all names would be accepted.

If the setting control represents a boolean condition and four recordings are running at the same time with the following values "true", "false", "false", and "incorrect", this method returns "true", because all recordings get at least all the requested data.

Annotations
@Override
getValueback to summary
public String getValue()

Implements abstract jdk.jfr.SettingControl.getValue.

Doc from jdk.jfr.SettingControl.getValue.

Returns the currently used value for this setting, not null.

The value returned by this method is valid as an argument to both the setValue(String) method and combine(Set) method.

This method is invoked when an event is registered to obtain the default value. It is therefore important that a valid value can be returned immediately after an instance of this class is created. It is not valid to return null.

Annotations
@Override
isTypeback to summary
public static boolean isType(long typeId)
setValueback to summary
public void setValue(String value)

Implements abstract jdk.jfr.SettingControl.setValue.

Doc from jdk.jfr.SettingControl.setValue.

Sets the value for this setting.

If the setting value is not valid for this setting, this method does not throw an exception. Instead, the value is ignored.

Annotations
@Override
validPeriodback to summary
private String validPeriod(String userDefault)