Package org.hibernate.event.monitor.spi
Interface EventMonitor
- All Known Subinterfaces:
EventManager
- All Known Implementing Classes:
EmptyEventMonitor
Contract implemented by services which collect, report, or monitor
diagnostic events involving interactions
between the session and the database
or second-level cache.
For example, this interface is implemented by Hibernate JFR to report events to Java Flight Recorder.
Note that event reporting is different to aggregate metrics,
which Hibernate exposes via the Statistics
interface.
- Since:
- 7.0
- API Note:
- This an incubating API, subject to change.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
completeCacheGetEvent
(DiagnosticEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, boolean hit) void
completeCacheGetEvent
(DiagnosticEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, CollectionPersister persister, boolean hit) void
completeCacheGetEvent
(DiagnosticEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, EntityPersister persister, boolean isNaturalKey, boolean hit) void
completeCachePutEvent
(DiagnosticEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, CollectionPersister persister, boolean cacheContentChanged, EventMonitor.CacheActionDescription description) void
completeCachePutEvent
(DiagnosticEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, boolean cacheContentChanged, boolean isNatualId, EventMonitor.CacheActionDescription description) void
completeCachePutEvent
(DiagnosticEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, boolean cacheContentChanged, EventMonitor.CacheActionDescription description) void
completeCachePutEvent
(DiagnosticEvent cachePutEvent, SharedSessionContractImplementor session, Region region, boolean cacheContentChanged, EventMonitor.CacheActionDescription description) void
completeCollectionRecreateEvent
(DiagnosticEvent event, Object id, String role, boolean success, SharedSessionContractImplementor session) void
completeCollectionRemoveEvent
(DiagnosticEvent event, Object id, String role, boolean success, SharedSessionContractImplementor session) void
completeCollectionUpdateEvent
(DiagnosticEvent event, Object id, String role, boolean success, SharedSessionContractImplementor session) void
completeDirtyCalculationEvent
(DiagnosticEvent dirtyCalculationEvent, SharedSessionContractImplementor session, EntityPersister persister, EntityEntry entry, int[] dirtyProperties) void
completeEntityDeleteEvent
(DiagnosticEvent event, Object id, String entityName, boolean success, SharedSessionContractImplementor session) void
completeEntityInsertEvent
(DiagnosticEvent event, Object id, String entityName, boolean success, SharedSessionContractImplementor session) void
completeEntityLockEvent
(DiagnosticEvent event, Object id, String entityName, LockMode lockMode, boolean success, SharedSessionContractImplementor session) void
completeEntityUpdateEvent
(DiagnosticEvent event, Object id, String entityName, boolean success, SharedSessionContractImplementor session) void
completeEntityUpsertEvent
(DiagnosticEvent event, Object id, String entityName, boolean success, SharedSessionContractImplementor session) void
completeFlushEvent
(DiagnosticEvent flushEvent, FlushEvent event) void
completeFlushEvent
(DiagnosticEvent flushEvent, FlushEvent event, boolean autoFlush) void
completeJdbcBatchExecutionEvent
(DiagnosticEvent jdbcBatchExecutionEvent, String statementSql) void
completeJdbcConnectionAcquisitionEvent
(DiagnosticEvent jdbcConnectionAcquisitionEvent, SharedSessionContractImplementor session, Object tenantId) void
completeJdbcConnectionReleaseEvent
(DiagnosticEvent jdbcConnectionReleaseEvent, SharedSessionContractImplementor session, Object tenantId) void
completeJdbcPreparedStatementCreationEvent
(DiagnosticEvent jdbcPreparedStatementCreation, String preparedStatementSql) void
completeJdbcPreparedStatementExecutionEvent
(DiagnosticEvent jdbcPreparedStatementExecutionEvent, String preparedStatementSql) void
completePartialFlushEvent
(DiagnosticEvent flushEvent, AutoFlushEvent event) void
completePrePartialFlush
(DiagnosticEvent prePartialFlush, SharedSessionContractImplementor session) void
completeSessionClosedEvent
(DiagnosticEvent sessionClosedEvent, SharedSessionContractImplementor session) void
completeSessionOpenEvent
(DiagnosticEvent sessionOpenEvent, SharedSessionContractImplementor session)
-
Method Details
-
beginSessionOpenEvent
DiagnosticEvent beginSessionOpenEvent() -
beginSessionClosedEvent
DiagnosticEvent beginSessionClosedEvent() -
beginJdbcConnectionAcquisitionEvent
DiagnosticEvent beginJdbcConnectionAcquisitionEvent() -
beginJdbcConnectionReleaseEvent
DiagnosticEvent beginJdbcConnectionReleaseEvent() -
beginJdbcPreparedStatementCreationEvent
DiagnosticEvent beginJdbcPreparedStatementCreationEvent() -
completeJdbcPreparedStatementCreationEvent
void completeJdbcPreparedStatementCreationEvent(DiagnosticEvent jdbcPreparedStatementCreation, String preparedStatementSql) -
beginJdbcPreparedStatementExecutionEvent
DiagnosticEvent beginJdbcPreparedStatementExecutionEvent() -
completeJdbcPreparedStatementExecutionEvent
void completeJdbcPreparedStatementExecutionEvent(DiagnosticEvent jdbcPreparedStatementExecutionEvent, String preparedStatementSql) -
beginJdbcBatchExecutionEvent
DiagnosticEvent beginJdbcBatchExecutionEvent() -
completeJdbcBatchExecutionEvent
-
beginCachePutEvent
DiagnosticEvent beginCachePutEvent() -
beginCacheGetEvent
DiagnosticEvent beginCacheGetEvent() -
beginFlushEvent
DiagnosticEvent beginFlushEvent() -
completeFlushEvent
-
completeFlushEvent
-
beginPartialFlushEvent
DiagnosticEvent beginPartialFlushEvent() -
completePartialFlushEvent
-
beginDirtyCalculationEvent
DiagnosticEvent beginDirtyCalculationEvent() -
beginPrePartialFlush
DiagnosticEvent beginPrePartialFlush() -
beginEntityInsertEvent
DiagnosticEvent beginEntityInsertEvent() -
beginEntityUpdateEvent
DiagnosticEvent beginEntityUpdateEvent() -
beginEntityUpsertEvent
DiagnosticEvent beginEntityUpsertEvent() -
beginEntityDeleteEvent
DiagnosticEvent beginEntityDeleteEvent() -
beginEntityLockEvent
DiagnosticEvent beginEntityLockEvent() -
beginCollectionRecreateEvent
DiagnosticEvent beginCollectionRecreateEvent() -
beginCollectionUpdateEvent
DiagnosticEvent beginCollectionUpdateEvent() -
beginCollectionRemoveEvent
DiagnosticEvent beginCollectionRemoveEvent()
-