HHH-17347 Rename HibernateEvent to HibernateMonitoringEvent
This commit is contained in:
parent
9f1f8e6c09
commit
d61749374a
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* <p>
|
||||
* <em>This an incubating API, subject to change.</em>
|
||||
*
|
||||
*
|
||||
*/
|
||||
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,
|
||||
|
|
|
@ -9,5 +9,5 @@ package org.hibernate.event.spi;
|
|||
import org.hibernate.Incubating;
|
||||
|
||||
@Incubating
|
||||
public interface HibernateEvent {
|
||||
public interface HibernateMonitoringEvent {
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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" )
|
||||
|
|
|
@ -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" )
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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" )
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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" )
|
||||
|
|
|
@ -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" )
|
||||
|
|
|
@ -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" )
|
||||
|
|
Loading…
Reference in New Issue