APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.event

public Class FileForceEvent

extends Event
Class Inheritance

A JFR event for forced updates written to files. This event is mirrored in jdk.jfr.events.FileForceEvent where the event annotations are provided. Some of the methods are replaced by generated methods when jfr is enabled. Note that the order of the arguments of the commit(long, long, String, boolean) method must be the same as the order of the fields.

Field Summary

Modifier and TypeField and Description
public boolean
public String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
commit(long
timestamp of the start of the operation
start
,
long
time in nanoseconds to complete the operation
duration
,
String
the full pathname of the file
path
,
boolean
true if the file metadata is updated
metaData
)

Actually commit an event.

public static boolean

Returns:

true if this type of event is enabled, false otherwise
enabled
()

Determine if this kind of event is enabled.

public static void
offer(long
timestamp of the start of the operation
start
,
String
the full pathname of the file
path
,
boolean
true if the file metadata is updated
metaData
)

Helper method to offer the data needed to potentially commit an event.

public static boolean

Returns:

true if the event should be commited
shouldCommit
(long
time in nanoseconds to complete the operation
duration
)

Determine if an event should be emitted.

public static long

Returns:

the current timestamp value
timestamp
()

Fetch the current timestamp in nanoseconds.

Inherited from jdk.internal.event.Event:
begincommitendisEnabledsetshouldCommit

Field Detail

metaDataback to summary
public boolean metaData
pathback to summary
public String path

Constructor Detail

FileForceEventback to summary
public FileForceEvent()

Method Detail

commitback to summary
public static void commit(long start, long duration, String path, boolean metaData)

Actually commit an event. The implementation is generated automatically. The order of the fields must be the same as the parameters in this method.

Parameters
start:long

timestamp of the start of the operation

duration:long

time in nanoseconds to complete the operation

path:String

the full pathname of the file

metaData:boolean

true if the file metadata is updated

enabledback to summary
public static boolean enabled()

Determine if this kind of event is enabled. The implementation of this method is generated automatically if jfr is enabled.

Returns:boolean

true if this type of event is enabled, false otherwise

offerback to summary
public static void offer(long start, String path, boolean metaData)

Helper method to offer the data needed to potentially commit an event. The duration of the operation is computed using the current timestamp and the given start time. If the duration is meets or exceeds the configured value (determined by calling the generated method shouldCommit(long)), an event will be emitted by calling commit(long, long, String, boolean).

Parameters
start:long

timestamp of the start of the operation

path:String

the full pathname of the file

metaData:boolean

true if the file metadata is updated

shouldCommitback to summary
public static boolean shouldCommit(long duration)

Determine if an event should be emitted. The duration of the operation must exceed some threshold in order to commit the event. The implementation of this method is generated automatically if jfr is enabled.

Parameters
duration:long

time in nanoseconds to complete the operation

Returns:boolean

true if the event should be commited

timestampback to summary
public static long timestamp()

Fetch the current timestamp in nanoseconds. This method is used to determine the start and end of an operation. The implementation of this method is generated automatically if jfr is enabled.

Returns:long

the current timestamp value