APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.jfr.consumer

public final Class RecordedEvent

extends RecordedObject
Class Inheritance
Imports
java.time.Duration, .Instant, java.util.List, jdk.jfr.EventType, .ValueDescriptor, jdk.jfr.internal.consumer.ObjectContext, jdk.jfr.internal.util.ImplicitFields

A recorded event.
Since
9

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv long
Inherited from jdk.jfr.consumer.RecordedObject:
INTEGER_MINUS_ONEINTEGER_ZEROLONG_MINUS_ONEobjectContextobjects

Constructor Summary

AccessConstructor and Description
pack-priv
RecordedEvent(ObjectContext objectContext, Object[] values, long startTimeTicks, long endTimeTicks)

Method Summary

Modifier and TypeMethod and Description
public Duration

Returns:

the duration in nanoseconds, not null
getDuration
()

Returns the duration of the event, measured in nanoseconds.

public Instant

Returns:

the end time, not null
getEndTime
()

Returns the end time of the event.

private long
public EventType

Returns:

the event type, not null
getEventType
()

Returns the event type that describes the event.

public List<ValueDescriptor>

Returns:

descriptors, not null
getFields
()

Overrides jdk.jfr.consumer.RecordedObject.getFields.

Returns the list of descriptors that describes the fields of the event.

public RecordedStackTrace

Returns:

stack trace, or null if doesn't exist for the event
getStackTrace
()

Returns the stack trace that was created when the event was committed, or null if the event lacks a stack trace.

public Instant

Returns:

the start time, not null
getStartTime
()

Returns the start time of the event.

private long
public RecordedThread

Returns:

thread, or null if doesn't exist for the event
getThread
()

Returns the thread from which the event was committed, or null if the thread was not recorded.

private boolean
pack-priv final Object
Inherited from jdk.jfr.consumer.RecordedObject:
getBooleangetBytegetChargetClassgetDoublegetDurationgetFloatgetInstantgetIntgetLonggetShortgetStringgetThreadgetTypedgetValuehasFieldtoString

Field Detail

endTimeTicksback to summary
pack-priv long endTimeTicks
startTimeTicksback to summary
pack-priv long startTimeTicks

Constructor Detail

RecordedEventback to summary
pack-priv RecordedEvent(ObjectContext objectContext, Object[] values, long startTimeTicks, long endTimeTicks)

Method Detail

getDurationback to summary
public Duration getDuration()

Returns the duration of the event, measured in nanoseconds.

Returns:Duration

the duration in nanoseconds, not null

getEndTimeback to summary
public Instant getEndTime()

Returns the end time of the event.

If the event is an instant event, then the start time and end time are the same.

Returns:Instant

the end time, not null

getEndTimeNanosback to summary
private long getEndTimeNanos()
getEventTypeback to summary
public EventType getEventType()

Returns the event type that describes the event.

Returns:EventType

the event type, not null

getFieldsback to summary
public List<ValueDescriptor> getFields()

Overrides jdk.jfr.consumer.RecordedObject.getFields.

Returns the list of descriptors that describes the fields of the event.

Returns:List<ValueDescriptor>

descriptors, not null

Annotations
@Override
getStackTraceback to summary
public RecordedStackTrace getStackTrace()

Returns the stack trace that was created when the event was committed, or null if the event lacks a stack trace.

Returns:RecordedStackTrace

stack trace, or null if doesn't exist for the event

getStartTimeback to summary
public Instant getStartTime()

Returns the start time of the event.

If the event is an instant event, then the start time and end time are the same.

Returns:Instant

the start time, not null

getStartTimeNanosback to summary
private long getStartTimeNanos()
getThreadback to summary
public RecordedThread getThread()

Returns the thread from which the event was committed, or null if the thread was not recorded.

Returns:RecordedThread

thread, or null if doesn't exist for the event

hasDurationback to summary
private boolean hasDuration()
objectAtback to summary
pack-priv final Object objectAt(int index)

Overrides jdk.jfr.consumer.RecordedObject.objectAt.

Annotations
@Override