diff --git a/hibernate-core/src/main/java/org/hibernate/action/internal/EntityInsertAction.java b/hibernate-core/src/main/java/org/hibernate/action/internal/EntityInsertAction.java index 948de39c70..28c8b79177 100644 --- a/hibernate-core/src/main/java/org/hibernate/action/internal/EntityInsertAction.java +++ b/hibernate-core/src/main/java/org/hibernate/action/internal/EntityInsertAction.java @@ -18,7 +18,7 @@ import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.service.spi.EventListenerGroup; import org.hibernate.event.spi.EventSource; import org.hibernate.event.spi.PostCommitInsertEventListener; @@ -164,7 +164,7 @@ public class EntityInsertAction extends AbstractEntityInsertAction { protected boolean cacheInsert(EntityPersister persister, Object ck) { SharedSessionContractImplementor session = getSession(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); final EntityDataAccess cacheAccessStrategy = persister.getCacheAccessStrategy(); boolean insert = false; try { @@ -256,7 +256,7 @@ public class EntityInsertAction extends AbstractEntityInsertAction { SharedSessionContractImplementor session = getSession(); final SessionEventListenerManager eventListenerManager = session.getEventListenerManager(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); boolean afterInsert = false; try { eventListenerManager.cachePutStart(); diff --git a/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java b/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java index 461d78333f..ffd9ae5700 100644 --- a/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java +++ b/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java @@ -20,7 +20,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.Status; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.service.spi.EventListenerGroup; import org.hibernate.event.spi.EventSource; import org.hibernate.event.spi.PostCommitUpdateEventListener; @@ -310,7 +310,7 @@ public class EntityUpdateAction extends EntityAction { protected boolean updateCache(EntityPersister persister, Object previousVersion, Object ck) { final SharedSessionContractImplementor session = getSession(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); final EntityDataAccess cacheAccessStrategy = persister.getCacheAccessStrategy(); boolean update = false; try { @@ -436,7 +436,7 @@ public class EntityUpdateAction extends EntityAction { protected void cacheAfterUpdate(EntityDataAccess cache, Object ck, SharedSessionContractImplementor session) { final SessionEventListenerManager eventListenerManager = session.getEventListenerManager(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); boolean put = false; try { eventListenerManager.cachePutStart(); diff --git a/hibernate-core/src/main/java/org/hibernate/cache/internal/QueryResultsCacheImpl.java b/hibernate-core/src/main/java/org/hibernate/cache/internal/QueryResultsCacheImpl.java index f0a54dada4..bccb772f19 100644 --- a/hibernate-core/src/main/java/org/hibernate/cache/internal/QueryResultsCacheImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/cache/internal/QueryResultsCacheImpl.java @@ -18,7 +18,7 @@ import org.hibernate.cache.spi.QueryResultsRegion; import org.hibernate.cache.spi.TimestampsCache; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import static org.hibernate.cache.spi.SecondLevelCacheLogger.L2CACHE_LOGGER; @@ -64,7 +64,7 @@ public class QueryResultsCacheImpl implements QueryResultsCache { ); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { session.getEventListenerManager().cachePutStart(); cacheRegion.putIntoCache( key, cacheItem, session ); @@ -154,7 +154,7 @@ public class QueryResultsCacheImpl implements QueryResultsCache { private CacheItem getCachedData(QueryKey key, SharedSessionContractImplementor session) { CacheItem cachedItem = null; final EventManager eventManager = session.getEventManager(); - final HibernateEvent cacheGetEvent = eventManager.beginCacheGetEvent(); + final HibernateMonitoringEvent cacheGetEvent = eventManager.beginCacheGetEvent(); try { session.getEventListenerManager().cacheGetStart(); cachedItem = (CacheItem) cacheRegion.getFromCache( key, session ); diff --git a/hibernate-core/src/main/java/org/hibernate/cache/internal/TimestampsCacheEnabledImpl.java b/hibernate-core/src/main/java/org/hibernate/cache/internal/TimestampsCacheEnabledImpl.java index 2fdd56c4c2..a27d00f1f9 100644 --- a/hibernate-core/src/main/java/org/hibernate/cache/internal/TimestampsCacheEnabledImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/cache/internal/TimestampsCacheEnabledImpl.java @@ -15,7 +15,7 @@ import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.stat.spi.StatisticsImplementor; import org.jboss.logging.Logger; @@ -61,7 +61,7 @@ public class TimestampsCacheEnabledImpl implements TimestampsCache { log.debugf( "Pre-invalidating space [%s], timestamp: %s", space, ts ); } final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { eventListenerManager.cachePutStart(); @@ -103,7 +103,7 @@ public class TimestampsCacheEnabledImpl implements TimestampsCache { final SessionEventListenerManager eventListenerManager = session.getEventListenerManager(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { eventListenerManager.cachePutStart(); timestampsRegion.putIntoCache( space, ts, session ); @@ -195,7 +195,7 @@ public class TimestampsCacheEnabledImpl implements TimestampsCache { private Long getLastUpdateTimestampForSpace(String space, SharedSessionContractImplementor session) { Long ts = null; final EventManager eventManager = session.getEventManager(); - final HibernateEvent cacheGetEvent = eventManager.beginCacheGetEvent(); + final HibernateMonitoringEvent cacheGetEvent = eventManager.beginCacheGetEvent(); try { session.getEventListenerManager().cacheGetStart(); ts = (Long) timestampsRegion.getFromCache( space, session ); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/CacheHelper.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/CacheHelper.java index 65f55e9ca0..d7c973e733 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/CacheHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/CacheHelper.java @@ -13,7 +13,7 @@ import org.hibernate.cache.spi.access.CachedDomainDataAccess; import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.entity.EntityPersister; @@ -47,7 +47,7 @@ public final class CacheHelper { Object cachedValue = null; eventListenerManager.cacheGetStart(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cacheGetEvent = eventManager.beginCacheGetEvent(); + final HibernateMonitoringEvent cacheGetEvent = eventManager.beginCacheGetEvent(); try { cachedValue = cacheAccess.get( session, cacheKey ); } @@ -74,7 +74,7 @@ public final class CacheHelper { Object cachedValue = null; eventListenerManager.cacheGetStart(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cacheGetEvent = eventManager.beginCacheGetEvent(); + final HibernateMonitoringEvent cacheGetEvent = eventManager.beginCacheGetEvent(); try { cachedValue = cacheAccess.get( session, cacheKey ); } diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/NaturalIdResolutionsImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/NaturalIdResolutionsImpl.java index 93737ebc7c..4960e9dd3a 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/NaturalIdResolutionsImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/NaturalIdResolutionsImpl.java @@ -24,7 +24,7 @@ import org.hibernate.engine.spi.Resolution; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.NaturalIdLogging; import org.hibernate.metamodel.mapping.NaturalIdMapping; @@ -275,7 +275,7 @@ public class NaturalIdResolutionsImpl implements NaturalIdResolutions, Serializa return; } boolean put = false; - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { put = cacheAccess.putFromLoad( s, @@ -307,7 +307,7 @@ public class NaturalIdResolutionsImpl implements NaturalIdResolutions, Serializa } case INSERT: { boolean put = false; - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { put = cacheAccess.insert( s, cacheKey, id ); @@ -360,7 +360,7 @@ public class NaturalIdResolutionsImpl implements NaturalIdResolutions, Serializa final SoftLock lock = cacheAccess.lockItem( s, cacheKey, null ); boolean put = false; - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { put = cacheAccess.update( s, cacheKey, id ); if ( put && statistics.isStatisticsEnabled() ) { @@ -387,7 +387,7 @@ public class NaturalIdResolutionsImpl implements NaturalIdResolutions, Serializa cacheAccess.unlockItem( s, previousCacheKey, removalLock ); if (success) { boolean putAfterUpdate = false; - final HibernateEvent cachePutEventAfterUpdate = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEventAfterUpdate = eventManager.beginCachePutEvent(); try { putAfterUpdate = cacheAccess.afterUpdate( s, diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/BatchImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/BatchImpl.java index 7a8dfc0785..2dcd5363d8 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/BatchImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/BatchImpl.java @@ -23,7 +23,7 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.jdbc.spi.SqlExceptionHelper; import org.hibernate.engine.jdbc.spi.SqlStatementLogger; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.resource.jdbc.spi.JdbcObserver; import org.hibernate.resource.jdbc.spi.JdbcSessionOwner; @@ -273,7 +273,7 @@ public class BatchImpl implements Batch { if ( statementDetails.getMutatingTableDetails().isIdentifierTable() ) { final int[] rowCounts; final EventManager eventManager = jdbcSessionOwner.getEventManager(); - final HibernateEvent jdbcBatchExecutionEvent = eventManager.beginJdbcBatchExecutionEvent(); + final HibernateMonitoringEvent jdbcBatchExecutionEvent = eventManager.beginJdbcBatchExecutionEvent(); try { observer.jdbcExecuteBatchStart(); rowCounts = statement.executeBatch(); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/MutationStatementPreparerImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/MutationStatementPreparerImpl.java index 7e9ed44355..52800c50a5 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/MutationStatementPreparerImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/MutationStatementPreparerImpl.java @@ -15,7 +15,7 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.jdbc.spi.MutationStatementPreparer; import org.hibernate.engine.jdbc.spi.SqlExceptionHelper; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.resource.jdbc.spi.JdbcObserver; import org.hibernate.resource.jdbc.spi.JdbcSessionContext; import org.hibernate.resource.jdbc.spi.JdbcSessionOwner; @@ -100,7 +100,7 @@ public class MutationStatementPreparerImpl implements MutationStatementPreparer .getJdbcSessionContext() .getObserver(); final EventManager eventManager = jdbcSessionOwner.getEventManager(); - final HibernateEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); try { observer.jdbcPrepareStatementStart(); preparedStatement = doPrepare(); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/ResultSetReturnImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/ResultSetReturnImpl.java index 296da51c3e..c4afb2da29 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/ResultSetReturnImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/ResultSetReturnImpl.java @@ -18,7 +18,7 @@ import org.hibernate.engine.jdbc.spi.ResultSetReturn; import org.hibernate.engine.jdbc.spi.SqlExceptionHelper; import org.hibernate.engine.jdbc.spi.SqlStatementLogger; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.resource.jdbc.spi.JdbcSessionContext; /** @@ -55,7 +55,7 @@ public class ResultSetReturnImpl implements ResultSetReturn { try { final ResultSet rs; final EventManager eventManager = jdbcCoordinator.getJdbcSessionOwner().getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { jdbcExecuteStatementStart(); rs = statement.executeQuery(); @@ -95,7 +95,7 @@ public class ResultSetReturnImpl implements ResultSetReturn { try { final ResultSet rs; final EventManager eventManager = jdbcCoordinator.getJdbcSessionOwner().getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { jdbcExecuteStatementStart(); rs = statement.executeQuery( sql ); @@ -123,7 +123,7 @@ public class ResultSetReturnImpl implements ResultSetReturn { try { final ResultSet rs; final EventManager eventManager = jdbcCoordinator.getJdbcSessionOwner().getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { jdbcExecuteStatementStart(); if ( !statement.execute() ) { @@ -156,7 +156,7 @@ public class ResultSetReturnImpl implements ResultSetReturn { try { final ResultSet rs; final EventManager eventManager = jdbcCoordinator.getJdbcSessionOwner().getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { jdbcExecuteStatementStart(); if ( !statement.execute( sql ) ) { @@ -188,7 +188,7 @@ public class ResultSetReturnImpl implements ResultSetReturn { executeStartNanos = System.nanoTime(); } final EventManager eventManager = jdbcCoordinator.getJdbcSessionOwner().getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { jdbcExecuteStatementStart(); return statement.executeUpdate(); @@ -211,7 +211,7 @@ public class ResultSetReturnImpl implements ResultSetReturn { executeStartNanos = System.nanoTime(); } final EventManager eventManager = jdbcCoordinator.getJdbcSessionOwner().getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { jdbcExecuteStatementStart(); return statement.executeUpdate( sql ); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/StatementPreparerImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/StatementPreparerImpl.java index 156231c7ba..3c0422f736 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/StatementPreparerImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/StatementPreparerImpl.java @@ -18,7 +18,7 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.jdbc.spi.SqlExceptionHelper; import org.hibernate.engine.jdbc.spi.StatementPreparer; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.resource.jdbc.spi.JdbcObserver; import org.hibernate.resource.jdbc.spi.JdbcSessionContext; import org.hibernate.resource.jdbc.spi.JdbcSessionOwner; @@ -177,7 +177,7 @@ class StatementPreparerImpl implements StatementPreparer { final JdbcSessionOwner jdbcSessionOwner = jdbcCoordinator.getJdbcSessionOwner(); final JdbcObserver observer = jdbcSessionOwner.getJdbcSessionContext().getObserver(); final EventManager eventManager = jdbcSessionOwner.getEventManager(); - final HibernateEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); try { observer.jdbcPrepareStatementStart(); preparedStatement = doPrepare(); diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultAutoFlushEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultAutoFlushEventListener.java index 96849c5900..c28a246cd9 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultAutoFlushEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultAutoFlushEventListener.java @@ -14,7 +14,7 @@ import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.event.spi.AutoFlushEvent; import org.hibernate.event.spi.AutoFlushEventListener; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.spi.EventSource; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.stat.spi.StatisticsImplementor; @@ -40,7 +40,7 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener final EventSource source = event.getSession(); final SessionEventListenerManager eventListenerManager = source.getEventListenerManager(); final EventManager eventManager = source.getEventManager(); - final HibernateEvent partialFlushEvent = eventManager.beginPartialFlushEvent(); + final HibernateMonitoringEvent partialFlushEvent = eventManager.beginPartialFlushEvent(); try { eventListenerManager.partialFlushStart(); @@ -56,7 +56,7 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener // note: performExecutions() clears all collectionXxxxtion // collections (the collection actions) in the session - final HibernateEvent flushEvent = eventManager.beginFlushEvent(); + final HibernateMonitoringEvent flushEvent = eventManager.beginFlushEvent(); try { performExecutions( source ); postFlush( source ); diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java index c3b7d20f18..d50b04c308 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java @@ -25,7 +25,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.engine.spi.Status; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.spi.EventSource; import org.hibernate.event.spi.FlushEntityEvent; import org.hibernate.event.spi.FlushEntityEventListener; @@ -485,7 +485,7 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener boolean dirtyCheckPossible; int[] dirtyProperties = null; final EventManager eventManager = session.getEventManager(); - final HibernateEvent dirtyCalculationEvent = eventManager.beginDirtyCalculationEvent(); + final HibernateMonitoringEvent dirtyCalculationEvent = eventManager.beginDirtyCalculationEvent(); final EntityEntry entry = event.getEntityEntry(); final EntityPersister persister = entry.getPersister(); try { diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEventListener.java index 49356b620a..af3882f447 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEventListener.java @@ -9,7 +9,7 @@ package org.hibernate.event.internal; import org.hibernate.HibernateException; import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.spi.EventSource; import org.hibernate.event.spi.FlushEvent; import org.hibernate.event.spi.FlushEventListener; @@ -33,7 +33,7 @@ public class DefaultFlushEventListener extends AbstractFlushingEventListener imp final EventManager eventManager = source.getEventManager(); if ( persistenceContext.getNumberOfManagedEntities() > 0 || persistenceContext.getCollectionEntriesSize() > 0 ) { - final HibernateEvent flushEvent = eventManager.beginFlushEvent(); + final HibernateMonitoringEvent flushEvent = eventManager.beginFlushEvent(); try { source.getEventListenerManager().flushStart(); diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/EmptyEventManager.java b/hibernate-core/src/main/java/org/hibernate/event/internal/EmptyEventManager.java index 5cdeae32fb..cff39a6832 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/EmptyEventManager.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/EmptyEventManager.java @@ -12,7 +12,7 @@ import org.hibernate.engine.spi.EntityEntry; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.AutoFlushEvent; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.spi.FlushEvent; import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.entity.EntityPersister; @@ -20,95 +20,95 @@ import org.hibernate.persister.entity.EntityPersister; public final class EmptyEventManager implements EventManager { @Override - public HibernateEvent beginSessionOpenEvent() { + public HibernateMonitoringEvent beginSessionOpenEvent() { return null; } @Override - public void completeSessionOpenEvent(HibernateEvent sessionOpenEvent, SharedSessionContractImplementor session) { + public void completeSessionOpenEvent(HibernateMonitoringEvent sessionOpenEvent, SharedSessionContractImplementor session) { } @Override - public HibernateEvent beginSessionClosedEvent() { + public HibernateMonitoringEvent beginSessionClosedEvent() { return null; } @Override public void completeSessionClosedEvent( - HibernateEvent sessionClosedEvent, + HibernateMonitoringEvent sessionClosedEvent, SharedSessionContractImplementor session) { } @Override - public HibernateEvent beginJdbcConnectionAcquisitionEvent() { + public HibernateMonitoringEvent beginJdbcConnectionAcquisitionEvent() { return null; } @Override public void completeJdbcConnectionAcquisitionEvent( - HibernateEvent jdbcConnectionAcquisitionEvent, + HibernateMonitoringEvent jdbcConnectionAcquisitionEvent, SharedSessionContractImplementor session, Object tenantId) { } @Override - public HibernateEvent beginJdbcConnectionReleaseEvent() { + public HibernateMonitoringEvent beginJdbcConnectionReleaseEvent() { return null; } @Override public void completeJdbcConnectionReleaseEvent( - HibernateEvent jdbcConnectionReleaseEvent, + HibernateMonitoringEvent jdbcConnectionReleaseEvent, SharedSessionContractImplementor session, Object tenantId) { } @Override - public HibernateEvent beginJdbcPreparedStatementCreationEvent() { + public HibernateMonitoringEvent beginJdbcPreparedStatementCreationEvent() { return null; } @Override public void completeJdbcPreparedStatementCreationEvent( - HibernateEvent jdbcPreparedStatementCreation, + HibernateMonitoringEvent jdbcPreparedStatementCreation, String preparedStatementSql) { } @Override - public HibernateEvent beginJdbcPreparedStatementExecutionEvent() { + public HibernateMonitoringEvent beginJdbcPreparedStatementExecutionEvent() { return null; } @Override public void completeJdbcPreparedStatementExecutionEvent( - HibernateEvent jdbcPreparedStatementExecutionEvent, + HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent, String preparedStatementSql) { } @Override - public HibernateEvent beginJdbcBatchExecutionEvent() { + public HibernateMonitoringEvent beginJdbcBatchExecutionEvent() { return null; } @Override - public void completeJdbcBatchExecutionEvent(HibernateEvent jdbcBatchExecutionEvent, String statementSql) { + public void completeJdbcBatchExecutionEvent(HibernateMonitoringEvent jdbcBatchExecutionEvent, String statementSql) { } @Override - public HibernateEvent beginCachePutEvent() { + public HibernateMonitoringEvent beginCachePutEvent() { return null; } @Override public void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, Region region, boolean cacheContentChanged, @@ -118,7 +118,7 @@ public final class EmptyEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, @@ -129,7 +129,7 @@ public final class EmptyEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, @@ -141,7 +141,7 @@ public final class EmptyEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, CollectionPersister persister, @@ -151,13 +151,13 @@ public final class EmptyEventManager implements EventManager { } @Override - public HibernateEvent beginCacheGetEvent() { + public HibernateMonitoringEvent beginCacheGetEvent() { return null; } @Override public void completeCacheGetEvent( - HibernateEvent cacheGetEvent, + HibernateMonitoringEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, boolean hit) { @@ -166,7 +166,7 @@ public final class EmptyEventManager implements EventManager { @Override public void completeCacheGetEvent( - HibernateEvent cacheGetEvent, + HibernateMonitoringEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, EntityPersister persister, @@ -177,7 +177,7 @@ public final class EmptyEventManager implements EventManager { @Override public void completeCacheGetEvent( - HibernateEvent cacheGetEvent, + HibernateMonitoringEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, CollectionPersister persister, @@ -186,38 +186,38 @@ public final class EmptyEventManager implements EventManager { } @Override - public HibernateEvent beginFlushEvent() { + public HibernateMonitoringEvent beginFlushEvent() { return null; } @Override - public void completeFlushEvent(HibernateEvent flushEvent, FlushEvent event) { + public void completeFlushEvent(HibernateMonitoringEvent flushEvent, FlushEvent event) { } @Override - public void completeFlushEvent(HibernateEvent flushEvent, FlushEvent event, boolean autoFlush) { + public void completeFlushEvent(HibernateMonitoringEvent flushEvent, FlushEvent event, boolean autoFlush) { } @Override - public HibernateEvent beginPartialFlushEvent() { + public HibernateMonitoringEvent beginPartialFlushEvent() { return null; } @Override - public void completePartialFlushEvent(HibernateEvent flushEvent, AutoFlushEvent event) { + public void completePartialFlushEvent(HibernateMonitoringEvent flushEvent, AutoFlushEvent event) { } @Override - public HibernateEvent beginDirtyCalculationEvent() { + public HibernateMonitoringEvent beginDirtyCalculationEvent() { return null; } @Override public void completeDirtyCalculationEvent( - HibernateEvent dirtyCalculationEvent, + HibernateMonitoringEvent dirtyCalculationEvent, SharedSessionContractImplementor session, EntityPersister persister, EntityEntry entry, diff --git a/hibernate-core/src/main/java/org/hibernate/event/spi/EventManager.java b/hibernate-core/src/main/java/org/hibernate/event/spi/EventManager.java index b9cc02ef78..7285235f3c 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/spi/EventManager.java +++ b/hibernate-core/src/main/java/org/hibernate/event/spi/EventManager.java @@ -17,62 +17,72 @@ import org.hibernate.service.JavaServiceLoadable; @JavaServiceLoadable @Incubating +/** + * Defines the contract for monitoring low-level events + * involving interactions between the {@link Session} and the database + * or second-level cache. + * + *

+ * This an incubating API, subject to change. + * + * + */ public interface EventManager { - HibernateEvent beginSessionOpenEvent(); + HibernateMonitoringEvent beginSessionOpenEvent(); void completeSessionOpenEvent( - HibernateEvent sessionOpenEvent, + HibernateMonitoringEvent sessionOpenEvent, SharedSessionContractImplementor session); - HibernateEvent beginSessionClosedEvent(); + HibernateMonitoringEvent beginSessionClosedEvent(); void completeSessionClosedEvent( - HibernateEvent sessionClosedEvent, + HibernateMonitoringEvent sessionClosedEvent, SharedSessionContractImplementor session); - HibernateEvent beginJdbcConnectionAcquisitionEvent(); + HibernateMonitoringEvent beginJdbcConnectionAcquisitionEvent(); void completeJdbcConnectionAcquisitionEvent( - HibernateEvent jdbcConnectionAcquisitionEvent, + HibernateMonitoringEvent jdbcConnectionAcquisitionEvent, SharedSessionContractImplementor session, Object tenantId); - HibernateEvent beginJdbcConnectionReleaseEvent(); + HibernateMonitoringEvent beginJdbcConnectionReleaseEvent(); void completeJdbcConnectionReleaseEvent( - HibernateEvent jdbcConnectionReleaseEvent, + HibernateMonitoringEvent jdbcConnectionReleaseEvent, SharedSessionContractImplementor session, Object tenantId); - HibernateEvent beginJdbcPreparedStatementCreationEvent(); + HibernateMonitoringEvent beginJdbcPreparedStatementCreationEvent(); void completeJdbcPreparedStatementCreationEvent( - HibernateEvent jdbcPreparedStatementCreation, + HibernateMonitoringEvent jdbcPreparedStatementCreation, String preparedStatementSql); - HibernateEvent beginJdbcPreparedStatementExecutionEvent(); + HibernateMonitoringEvent beginJdbcPreparedStatementExecutionEvent(); void completeJdbcPreparedStatementExecutionEvent( - HibernateEvent jdbcPreparedStatementExecutionEvent, + HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent, String preparedStatementSql); - HibernateEvent beginJdbcBatchExecutionEvent(); + HibernateMonitoringEvent beginJdbcBatchExecutionEvent(); void completeJdbcBatchExecutionEvent( - HibernateEvent jdbcBatchExecutionEvent, + HibernateMonitoringEvent jdbcBatchExecutionEvent, String statementSql); - HibernateEvent beginCachePutEvent(); + HibernateMonitoringEvent beginCachePutEvent(); void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, Region region, boolean cacheContentChanged, CacheActionDescription description); void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, @@ -80,7 +90,7 @@ public interface EventManager { CacheActionDescription description); void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, @@ -89,23 +99,23 @@ public interface EventManager { CacheActionDescription description); void completeCachePutEvent( - HibernateEvent cachePutEvent, + HibernateMonitoringEvent cachePutEvent, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, CollectionPersister persister, boolean cacheContentChanged, CacheActionDescription description); - HibernateEvent beginCacheGetEvent(); + HibernateMonitoringEvent beginCacheGetEvent(); void completeCacheGetEvent( - HibernateEvent cacheGetEvent, + HibernateMonitoringEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, boolean hit); void completeCacheGetEvent( - HibernateEvent cacheGetEvent, + HibernateMonitoringEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, EntityPersister persister, @@ -113,33 +123,33 @@ public interface EventManager { boolean hit); void completeCacheGetEvent( - HibernateEvent cacheGetEvent, + HibernateMonitoringEvent cacheGetEvent, SharedSessionContractImplementor session, Region region, CollectionPersister persister, boolean hit); - HibernateEvent beginFlushEvent(); + HibernateMonitoringEvent beginFlushEvent(); void completeFlushEvent( - HibernateEvent flushEvent, + HibernateMonitoringEvent flushEvent, org.hibernate.event.spi.FlushEvent event); void completeFlushEvent( - HibernateEvent flushEvent, + HibernateMonitoringEvent flushEvent, org.hibernate.event.spi.FlushEvent event, boolean autoFlush); - HibernateEvent beginPartialFlushEvent(); + HibernateMonitoringEvent beginPartialFlushEvent(); void completePartialFlushEvent( - HibernateEvent flushEvent, + HibernateMonitoringEvent flushEvent, AutoFlushEvent event); - HibernateEvent beginDirtyCalculationEvent(); + HibernateMonitoringEvent beginDirtyCalculationEvent(); void completeDirtyCalculationEvent( - HibernateEvent dirtyCalculationEvent, + HibernateMonitoringEvent dirtyCalculationEvent, SharedSessionContractImplementor session, EntityPersister persister, EntityEntry entry, diff --git a/hibernate-core/src/main/java/org/hibernate/event/spi/HibernateEvent.java b/hibernate-core/src/main/java/org/hibernate/event/spi/HibernateMonitoringEvent.java similarity index 87% rename from hibernate-core/src/main/java/org/hibernate/event/spi/HibernateEvent.java rename to hibernate-core/src/main/java/org/hibernate/event/spi/HibernateMonitoringEvent.java index 9b1e7ff332..eae9dd087f 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/spi/HibernateEvent.java +++ b/hibernate-core/src/main/java/org/hibernate/event/spi/HibernateMonitoringEvent.java @@ -9,5 +9,5 @@ package org.hibernate.event.spi; import org.hibernate.Incubating; @Incubating -public interface HibernateEvent { +public interface HibernateMonitoringEvent { } diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java index 6058891230..ac7ea5d719 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java @@ -35,7 +35,7 @@ import org.hibernate.engine.jdbc.spi.SqlStatementLogger; import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.id.ExportableColumn; import org.hibernate.id.IdentifierGeneratorHelper; import org.hibernate.id.IntegralDataTypeHolder; @@ -669,7 +669,7 @@ public class TableGenerator implements PersistentIdentifierGenerator { SharedSessionContractImplementor session) throws SQLException { logger.logStatement( sql, FormatStyle.BASIC.getFormatter() ); final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); try { listener.jdbcPrepareStatementStart(); return connection.prepareStatement( sql ); @@ -686,7 +686,7 @@ public class TableGenerator implements PersistentIdentifierGenerator { String sql, SharedSessionContractImplementor session) throws SQLException { final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { listener.jdbcExecuteStatementStart(); return ps.executeUpdate(); @@ -703,7 +703,7 @@ public class TableGenerator implements PersistentIdentifierGenerator { String sql, SharedSessionContractImplementor session) throws SQLException { final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { listener.jdbcExecuteStatementStart(); return ps.executeQuery(); diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java index a7316dbcf1..3dc73f80a9 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java @@ -27,7 +27,7 @@ import org.hibernate.engine.jdbc.spi.SqlStatementLogger; import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.id.ExportableColumn; import org.hibernate.id.IdentifierGenerationException; import org.hibernate.id.IdentifierGeneratorHelper; @@ -209,7 +209,7 @@ public class TableStructure implements DatabaseStructure { SharedSessionContractImplementor session) throws SQLException { statementLogger.logStatement( sql, FormatStyle.BASIC.getFormatter() ); final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementCreation = eventManager.beginJdbcPreparedStatementCreationEvent(); try { statsCollector.jdbcPrepareStatementStart(); return connection.prepareStatement( sql ); @@ -226,7 +226,7 @@ public class TableStructure implements DatabaseStructure { String sql, SharedSessionContractImplementor session) throws SQLException { final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { statsCollector.jdbcExecuteStatementStart(); return ps.executeUpdate(); @@ -244,7 +244,7 @@ public class TableStructure implements DatabaseStructure { String sql, SharedSessionContractImplementor session) throws SQLException { final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { statsCollector.jdbcExecuteStatementStart(); return ps.executeQuery(); diff --git a/hibernate-core/src/main/java/org/hibernate/internal/ContextualJdbcConnectionAccess.java b/hibernate-core/src/main/java/org/hibernate/internal/ContextualJdbcConnectionAccess.java index 008769f33b..bbb5baf791 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/ContextualJdbcConnectionAccess.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/ContextualJdbcConnectionAccess.java @@ -16,7 +16,7 @@ import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess; import org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; /** * @author Steve Ebersole @@ -46,7 +46,7 @@ public class ContextualJdbcConnectionAccess implements JdbcConnectionAccess, Ser } final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcConnectionAcquisitionEvent = eventManager.beginJdbcConnectionAcquisitionEvent(); + final HibernateMonitoringEvent jdbcConnectionAcquisitionEvent = eventManager.beginJdbcConnectionAcquisitionEvent(); try { listener.jdbcConnectionAcquisitionStart(); return connectionProvider.getConnection( tenantIdentifier ); @@ -68,7 +68,7 @@ public class ContextualJdbcConnectionAccess implements JdbcConnectionAccess, Ser } final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcConnectionReleaseEvent = eventManager.beginJdbcConnectionReleaseEvent(); + final HibernateMonitoringEvent jdbcConnectionReleaseEvent = eventManager.beginJdbcConnectionReleaseEvent(); try { listener.jdbcConnectionReleaseStart(); connectionProvider.releaseConnection( tenantIdentifier, connection ); diff --git a/hibernate-core/src/main/java/org/hibernate/internal/NonContextualJdbcConnectionAccess.java b/hibernate-core/src/main/java/org/hibernate/internal/NonContextualJdbcConnectionAccess.java index 1d90d45da8..3f8e9e8db3 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/NonContextualJdbcConnectionAccess.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/NonContextualJdbcConnectionAccess.java @@ -16,7 +16,7 @@ import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; /** * @author Steve Ebersole @@ -40,7 +40,7 @@ public class NonContextualJdbcConnectionAccess implements JdbcConnectionAccess, @Override public Connection obtainConnection() throws SQLException { final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcConnectionAcquisitionEvent = eventManager.beginJdbcConnectionAcquisitionEvent(); + final HibernateMonitoringEvent jdbcConnectionAcquisitionEvent = eventManager.beginJdbcConnectionAcquisitionEvent(); try { listener.jdbcConnectionAcquisitionStart(); return connectionProvider.getConnection(); @@ -58,7 +58,7 @@ public class NonContextualJdbcConnectionAccess implements JdbcConnectionAccess, @Override public void releaseConnection(Connection connection) throws SQLException { final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcConnectionReleaseEvent = eventManager.beginJdbcConnectionReleaseEvent(); + final HibernateMonitoringEvent jdbcConnectionReleaseEvent = eventManager.beginJdbcConnectionReleaseEvent(); try { listener.jdbcConnectionReleaseStart(); connectionProvider.closeConnection( connection ); diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java index 345565c8c9..2cb368a851 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java @@ -69,7 +69,7 @@ import org.hibernate.engine.spi.Status; import org.hibernate.engine.transaction.spi.TransactionImplementor; import org.hibernate.engine.transaction.spi.TransactionObserver; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.spi.AutoFlushEvent; import org.hibernate.event.spi.AutoFlushEventListener; import org.hibernate.event.spi.ClearEvent; @@ -227,7 +227,7 @@ public class SessionImpl public SessionImpl(SessionFactoryImpl factory, SessionCreationOptions options) { super( factory, options ); - final HibernateEvent sessionOpenEvent = getEventManager().beginSessionOpenEvent(); + final HibernateMonitoringEvent sessionOpenEvent = getEventManager().beginSessionOpenEvent(); persistenceContext = createPersistenceContext(); actionQueue = createActionQueue(); @@ -417,7 +417,7 @@ public class SessionImpl } final EventManager eventManager = getEventManager(); - final HibernateEvent sessionClosedEvent = eventManager.beginSessionClosedEvent(); + final HibernateMonitoringEvent sessionClosedEvent = eventManager.beginSessionClosedEvent(); // todo : we want this check if usage is JPA, but not native Hibernate usage final SessionFactoryImplementor sessionFactory = getSessionFactory(); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/StandardJdbcMutationExecutor.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/StandardJdbcMutationExecutor.java index 0be977490f..062683fb8d 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/StandardJdbcMutationExecutor.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/StandardJdbcMutationExecutor.java @@ -14,7 +14,7 @@ import java.util.function.Function; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.query.spi.QueryOptions; import org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor; import org.hibernate.sql.exec.spi.ExecutionContext; @@ -82,7 +82,7 @@ public class StandardJdbcMutationExecutor implements JdbcMutationExecutor { session.getEventListenerManager().jdbcExecuteStatementStart(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { int rows = preparedStatement.executeUpdate(); expectationCheck.accept( rows, preparedStatement ); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java index 5d60446a86..249b2fb221 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java @@ -29,7 +29,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.Status; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.event.spi.PreLoadEvent; import org.hibernate.event.spi.PreLoadEventListener; import org.hibernate.internal.util.StringHelper; @@ -988,7 +988,7 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces final EventManager eventManager = session.getEventManager(); if ( persistenceContext.wasInsertedDuringTransaction( concreteDescriptor, entityIdentifier) ) { boolean update = false; - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { update = cacheAccess.update( session, @@ -1012,7 +1012,7 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces else { final SessionEventListenerManager eventListenerManager = session.getEventListenerManager(); boolean put = false; - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); try { eventListenerManager.cachePutStart(); put = cacheAccess.putFromLoad( diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/internal/ResultsHelper.java b/hibernate-core/src/main/java/org/hibernate/sql/results/internal/ResultsHelper.java index ec1477a573..03b7429405 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/internal/ResultsHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/internal/ResultsHelper.java @@ -23,7 +23,7 @@ import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.metamodel.mapping.ModelPart; @@ -289,7 +289,7 @@ public class ResultsHelper { if ( isPutFromLoad ) { final SessionEventListenerManager eventListenerManager = session.getEventListenerManager(); final EventManager eventManager = session.getEventManager(); - final HibernateEvent cachePutEvent = eventManager.beginCachePutEvent(); + final HibernateMonitoringEvent cachePutEvent = eventManager.beginCachePutEvent(); boolean put = false; try { eventListenerManager.cachePutStart(); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java index 0c5a89f802..d84a8d5031 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java @@ -22,7 +22,7 @@ import org.hibernate.engine.spi.SessionEventListenerManager; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.EventManager; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.query.spi.Limit; @@ -240,7 +240,7 @@ public class DeferredResultSetAccess extends AbstractResultSetAccess { executeStartNanos = System.nanoTime(); } final EventManager eventManager = session.getEventManager(); - final HibernateEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); + final HibernateMonitoringEvent jdbcPreparedStatementExecutionEvent = eventManager.beginJdbcPreparedStatementExecutionEvent(); try { eventListenerManager.jdbcExecuteStatementStart(); resultSet = wrapResultSet( preparedStatement.executeQuery() ); diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CacheGetEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CacheGetEvent.java index 3931a6978f..aa769b3455 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CacheGetEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CacheGetEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description( "Cache Get Executed" ) @StackTrace(false) @AllowNonPortable -public class CacheGetEvent extends Event implements HibernateEvent { +public class CacheGetEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.CacheGet"; @Label( "Session Identifier" ) diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CachePutEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CachePutEvent.java index b00a4cb9b9..c8e52483a9 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CachePutEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/CachePutEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description( "Cache Put Executed" ) @StackTrace(false) @AllowNonPortable -public class CachePutEvent extends Event implements HibernateEvent { +public class CachePutEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.CachePut"; @Label( "Session Identifier" ) diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/DirtyCalculationEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/DirtyCalculationEvent.java index e2a4684554..e640c730db 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/DirtyCalculationEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/DirtyCalculationEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description("DirtyCalculationEvent Execution") @StackTrace(false) @AllowNonPortable -public class DirtyCalculationEvent extends Event implements HibernateEvent { +public class DirtyCalculationEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.DirtyCalculationEvent"; @Label("Session Identifier") diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/FlushEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/FlushEvent.java index 2eaf26655c..5d2c0fe2c4 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/FlushEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/FlushEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description("Flush Execution") @StackTrace(false) @AllowNonPortable -public class FlushEvent extends Event implements HibernateEvent { +public class FlushEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.FlushEvent"; @Label("Session Identifier") diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcBatchExecutionEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcBatchExecutionEvent.java index 829d8b9fb8..589464000b 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcBatchExecutionEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcBatchExecutionEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description("JDBC Batch Execution") @StackTrace(false) @AllowNonPortable -public class JdbcBatchExecutionEvent extends Event implements HibernateEvent { +public class JdbcBatchExecutionEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.JdbcBatchExecution"; @Label("PreparedStatement SQL") diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionAcquisitionEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionAcquisitionEvent.java index 1a847fee1a..2d885ccd1c 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionAcquisitionEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionAcquisitionEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description("JDBC Connection Obtained") @StackTrace(false) @AllowNonPortable -public class JdbcConnectionAcquisitionEvent extends Event implements HibernateEvent { +public class JdbcConnectionAcquisitionEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.JdbcConnectionAcquisition"; @Label("Session Identifier") diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionReleaseEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionReleaseEvent.java index 0b8ec507e9..3aa1d5bef4 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionReleaseEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcConnectionReleaseEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description("JDBC Connection Released") @StackTrace(false) @AllowNonPortable -public class JdbcConnectionReleaseEvent extends Event implements HibernateEvent { +public class JdbcConnectionReleaseEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.JdbcConnectionRelease"; @Label("Session Identifier") diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementCreationEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementCreationEvent.java index 68d725f1a5..71d671b701 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementCreationEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementCreationEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description("JDBC PreparedStatement Created") @StackTrace(false) @AllowNonPortable -public class JdbcPreparedStatementCreationEvent extends Event implements HibernateEvent { +public class JdbcPreparedStatementCreationEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.JdbcPreparedStatementCreation"; @Label("PreparedStatement SQL") diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementExecutionEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementExecutionEvent.java index da4b0e0bcc..5c8ca92cef 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementExecutionEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JdbcPreparedStatementExecutionEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description( "JDBC PreparedStatement Executed" ) @StackTrace(false) @AllowNonPortable -public class JdbcPreparedStatementExecutionEvent extends Event implements HibernateEvent { +public class JdbcPreparedStatementExecutionEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.JdbcPreparedStatementExecution"; @Label( "PreparedStatement SQL" ) diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JfrEventManager.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JfrEventManager.java index 7e930da184..e4586ba268 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JfrEventManager.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/JfrEventManager.java @@ -13,7 +13,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.event.spi.AutoFlushEvent; import org.hibernate.event.spi.EventManager; import org.hibernate.event.spi.EventSource; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.entity.EntityPersister; @@ -58,7 +58,7 @@ public class JfrEventManager implements EventManager { @Override public void completeSessionOpenEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session) { if ( event != null ) { final SessionOpenEvent sessionOpenEvent = (SessionOpenEvent) event; @@ -84,7 +84,7 @@ public class JfrEventManager implements EventManager { @Override public void completeSessionClosedEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session) { if ( event != null ) { final SessionClosedEvent sessionClosedEvent = (SessionClosedEvent) event; @@ -111,7 +111,7 @@ public class JfrEventManager implements EventManager { @Override public void completeJdbcConnectionAcquisitionEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, Object tenantId) { if ( event != null ) { @@ -143,7 +143,7 @@ public class JfrEventManager implements EventManager { @Override public void completeJdbcConnectionReleaseEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, Object tenantId) { if ( event != null ) { @@ -175,7 +175,7 @@ public class JfrEventManager implements EventManager { @Override public void completeJdbcPreparedStatementCreationEvent( - HibernateEvent event, + HibernateMonitoringEvent event, String preparedStatementSql) { if ( event != null ) { final JdbcPreparedStatementCreationEvent jdbcPreparedStatementCreation = (JdbcPreparedStatementCreationEvent) event; @@ -203,7 +203,7 @@ public class JfrEventManager implements EventManager { @Override public void completeJdbcPreparedStatementExecutionEvent( - HibernateEvent event, + HibernateMonitoringEvent event, String preparedStatementSql) { if ( event != null ) { final JdbcPreparedStatementExecutionEvent jdbcPreparedStatementExecutionEvent = (JdbcPreparedStatementExecutionEvent) event; @@ -232,7 +232,7 @@ public class JfrEventManager implements EventManager { @Override public void completeJdbcBatchExecutionEvent( - HibernateEvent event, + HibernateMonitoringEvent event, String statementSql) { if ( event != null ) { final JdbcBatchExecutionEvent jdbcBatchExecutionEvent = (JdbcBatchExecutionEvent) event; @@ -246,7 +246,7 @@ public class JfrEventManager implements EventManager { } @Override - public HibernateEvent beginCachePutEvent() { + public HibernateMonitoringEvent beginCachePutEvent() { if ( cachePutEventType.isEnabled() ) { final CachePutEvent cachePutEvent = new CachePutEvent(); cachePutEvent.begin(); @@ -260,7 +260,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, Region region, boolean cacheContentChanged, @@ -281,7 +281,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, @@ -300,7 +300,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, EntityPersister persister, @@ -325,7 +325,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCachePutEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, CachedDomainDataAccess cachedDomainDataAccess, CollectionPersister persister, @@ -347,7 +347,7 @@ public class JfrEventManager implements EventManager { } @Override - public HibernateEvent beginCacheGetEvent() { + public HibernateMonitoringEvent beginCacheGetEvent() { if ( cacheGetEventType.isEnabled() ) { final CacheGetEvent cacheGetEvent = new CacheGetEvent(); cacheGetEvent.begin(); @@ -361,7 +361,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCacheGetEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, Region region, boolean hit) { @@ -380,7 +380,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCacheGetEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, Region region, EntityPersister persister, @@ -403,7 +403,7 @@ public class JfrEventManager implements EventManager { @Override public void completeCacheGetEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, Region region, CollectionPersister persister, @@ -437,18 +437,18 @@ public class JfrEventManager implements EventManager { @Override public void completeFlushEvent( - HibernateEvent flushEvent, + HibernateMonitoringEvent flushEvent, org.hibernate.event.spi.FlushEvent event) { completeFlushEvent( flushEvent, event, false ); } @Override public void completeFlushEvent( - HibernateEvent hibernateEvent, + HibernateMonitoringEvent hibernateMonitoringEvent, org.hibernate.event.spi.FlushEvent event, boolean autoFlush) { - if ( hibernateEvent != null ) { - final FlushEvent flushEvent = (FlushEvent) hibernateEvent; + if ( hibernateMonitoringEvent != null ) { + final FlushEvent flushEvent = (FlushEvent) hibernateMonitoringEvent; flushEvent.end(); if ( flushEvent.shouldCommit() ) { flushEvent.executionTime = getExecutionTime( flushEvent.startedAt ); @@ -477,10 +477,10 @@ public class JfrEventManager implements EventManager { @Override public void completePartialFlushEvent( - HibernateEvent hibernateEvent, + HibernateMonitoringEvent hibernateMonitoringEvent, AutoFlushEvent event) { if ( event != null ) { - final PartialFlushEvent flushEvent = (PartialFlushEvent) hibernateEvent; + final PartialFlushEvent flushEvent = (PartialFlushEvent) hibernateMonitoringEvent; flushEvent.end(); if ( flushEvent.shouldCommit() ) { flushEvent.executionTime = getExecutionTime( flushEvent.startedAt ); @@ -509,7 +509,7 @@ public class JfrEventManager implements EventManager { @Override public void completeDirtyCalculationEvent( - HibernateEvent event, + HibernateMonitoringEvent event, SharedSessionContractImplementor session, EntityPersister persister, EntityEntry entry, diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/PartialFlushEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/PartialFlushEvent.java index 795d16e82b..b408eb8374 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/PartialFlushEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/PartialFlushEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -22,7 +22,7 @@ import jdk.jfr.StackTrace; @Description( "PartialFlushEvent Execution" ) @StackTrace(false) @AllowNonPortable -public class PartialFlushEvent extends Event implements HibernateEvent { +public class PartialFlushEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.PartialFlushEvent"; @Label( "Session Identifier" ) diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionClosedEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionClosedEvent.java index 1f3defac33..16ab436707 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionClosedEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionClosedEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -25,7 +25,7 @@ import jdk.jfr.StackTrace; @Description("Hibernate Session closed") @StackTrace(false) @AllowNonPortable -public class SessionClosedEvent extends Event implements HibernateEvent { +public class SessionClosedEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.SessionClosed"; @Label("Session Identifier" ) diff --git a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionOpenEvent.java b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionOpenEvent.java index 07ba3bc707..ce2f7e4749 100644 --- a/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionOpenEvent.java +++ b/hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/SessionOpenEvent.java @@ -6,7 +6,7 @@ */ package org.hibernate.event.jfr.internal; -import org.hibernate.event.spi.HibernateEvent; +import org.hibernate.event.spi.HibernateMonitoringEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; @@ -25,7 +25,7 @@ import jdk.jfr.StackTrace; @Description("Hibernate Session opened") @StackTrace(false) @AllowNonPortable -public class SessionOpenEvent extends Event implements HibernateEvent { +public class SessionOpenEvent extends Event implements HibernateMonitoringEvent { public static final String NAME = "org.hibernate.orm.SessionOpen"; @Label("Session Identifier" )