Interface RecordedEventHandler
- All Superinterfaces:
AutoCloseable,Consumer<RecordedEvent>,Predicate<RecordedEvent>
- All Known Implementing Classes:
AbstractThreadDispatchingHandler,ClassesLoadedHandler,CodeCacheConfigurationHandler,ContainerConfigurationHandler,ContextSwitchRateHandler,DirectBufferStatisticsHandler,G1GarbageCollectionHandler,G1HeapSummaryHandler,LongLockHandler,MetaspaceSummaryHandler,NetworkReadHandler,NetworkWriteHandler,ObjectAllocationInNewTlabHandler,ObjectAllocationOutsideTlabHandler,OldGarbageCollectionHandler,OverallCpuLoadHandler,ParallelHeapSummaryHandler,ThreadCountHandler,YoungGarbageCollectionHandler
public interface RecordedEventHandler
extends Consumer<RecordedEvent>, Predicate<RecordedEvent>, AutoCloseable
Convenience/Tag interface for defining how JFR events should turn into metrics.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()static voidcloseObservables(List<AutoCloseable> observables) JFR event name (e.g. jdk.ObjectAllocationInNewTLAB)Return theJfrFeaturethis handler is associated with.Optionally returns a polling duration for JFR events, if presentOptionally returns a threshold length for JFR events, if presentdefault booleantest(RecordedEvent event) Test to see if this event is interesting to this mapper
-
Method Details
-
getEventName
String getEventName()JFR event name (e.g. jdk.ObjectAllocationInNewTLAB)- Returns:
- String representation of JFR event name
-
getFeature
JfrFeature getFeature()Return theJfrFeaturethis handler is associated with. -
test
Test to see if this event is interesting to this mapper- Specified by:
testin interfacePredicate<RecordedEvent>- Parameters:
event- - event instance to see if we're interested- Returns:
- true if event is interesting, false otherwise
-
getPollingDuration
Optionally returns a polling duration for JFR events, if present -
getThreshold
Optionally returns a threshold length for JFR events, if present -
closeObservables
-
close
default void close()- Specified by:
closein interfaceAutoCloseable
-