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

public final Class FileReadEvent

extends Event
Class Inheritance

Event recording file reads.

Field Summary

Modifier and TypeField and Description
public long
public boolean
public String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
commit(long start, long duration, String path, long bytesRead, boolean endOfFile)

public static boolean
public static void
offer(long
the start time
start
,
String
the path
path
,
long
the number of bytes that were read, or -1 if the end of the file was reached
bytesRead
)

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

public static boolean
shouldThrottleCommit(long duration, long end)

public static long
Inherited from jdk.internal.event.Event:
begincommitendisEnabledsetshouldCommit

Field Detail

bytesReadback to summary
public long bytesRead
endOfFileback to summary
public boolean endOfFile
pathback to summary
public String path

Constructor Detail

FileReadEventback to summary
public FileReadEvent()

Method Detail

commitback to summary
public static void commit(long start, long duration, String path, long bytesRead, boolean endOfFile)
enabledback to summary
public static boolean enabled()
offerback to summary
public static void offer(long start, String path, long bytesRead)

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 meets or exceeds the configured value and is not throttled (determined by calling the generated method shouldThrottleCommit(long, long)), an event will be emitted by calling commit(long, long, String, long, boolean)

Parameters
start:long

the start time

path:String

the path

bytesRead:long

the number of bytes that were read, or -1 if the end of the file was reached

shouldThrottleCommitback to summary
public static boolean shouldThrottleCommit(long duration, long end)
timestampback to summary
public static long timestamp()