# Uses of Class
jdk.jfr.Event

Packages that use Event
Package
Description
jdk.jfr
This package provides classes to create events and control Flight Recorder.
jdk.jfr.consumer
This package contains classes for consuming Flight Recorder data.

## Uses of Event in jdk.jfr

Methods in jdk.jfr that return Event
Modifier and Type
Method
Description
`Event`
EventFactory.`newEvent()`
Instantiates an event, so it can be populated with data and written to the Flight Recorder system.
Method parameters in jdk.jfr with type arguments of type Event
Modifier and Type
Method
Description
`static void`
FlightRecorder.`addPeriodicEvent(Class<? extends Event> eventClass, Runnable hook)`
Adds a hook for a periodic event.
`EventSettings`
Recording.`disable(Class<? extends Event> eventClass)`
Disables event.
`EventSettings`
Recording.`enable(Class<? extends Event> eventClass)`
Enables event.
`static EventType`
EventType.`getEventType(Class<? extends Event> eventClass)`
Returns the event type for an event class, or `null` if it doesn't exist.
`static void`
FlightRecorder.`register(Class<? extends Event> eventClass)`
Registers an event class.
`static void`
FlightRecorder.`unregister(Class<? extends Event> eventClass)`
Unregisters an event class.

## Uses of Event in jdk.jfr.consumer

Method parameters in jdk.jfr.consumer with type arguments of type Event
Modifier and Type
Method
Description
`EventSettings`
RecordingStream.`disable(Class<? extends Event> eventClass)`
Disables event.
`EventSettings`
RecordingStream.`enable(Class<? extends Event> eventClass)`
Enables event.