Package io.lettuce.core.event.jfr
Interface EventRecorder
-
public interface EventRecorder
Event recorder that can delegate events from theEventBus
into a recording facility such as JFR. Transforming anEvent
into a recordable event is subject to the actualEventRecorder
implementation.You can record data by launching the application with recording enabled:
java -XX:StartFlightRecording:filename=recording.jfr,duration=10s -jar app.jar
.- Since:
- 6.1
- Author:
- Mark Paluch
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EventRecorder.RecordableEvent
Interface defining a recordable event that is recorded on callingEventRecorder.RecordableEvent.record()
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static EventRecorder
getInstance()
Obtain an instance of theEventRecorder
.void
record(Event event)
Record an event.EventRecorder.RecordableEvent
start(Event event)
Start recording an event.
-
-
-
Method Detail
-
getInstance
static EventRecorder getInstance()
Obtain an instance of theEventRecorder
.- Returns:
- an instance of the
EventRecorder
.
-
record
void record(Event event)
Record an event.- Parameters:
event
- the event to record, must not benull
.
-
start
EventRecorder.RecordableEvent start(Event event)
Start recording an event. This method returns aEventRecorder.RecordableEvent
that can be recorded by callingEventRecorder.RecordableEvent.record()
. These events can be used to measure time between start and record.- Parameters:
event
- the event to record, must not benull
.
-
-