@@ -56,10 +56,10 @@ public SessionOpenEvent beginSessionOpenEvent() {
56
56
57
57
@ Override
58
58
public void completeSessionOpenEvent (
59
- HibernateMonitoringEvent event ,
59
+ HibernateMonitoringEvent monitoringEvent ,
60
60
SharedSessionContractImplementor session ) {
61
- if ( event != null ) {
62
- final SessionOpenEvent sessionOpenEvent = (SessionOpenEvent ) event ;
61
+ if ( monitoringEvent != null ) {
62
+ final SessionOpenEvent sessionOpenEvent = (SessionOpenEvent ) monitoringEvent ;
63
63
sessionOpenEvent .end ();
64
64
if ( sessionOpenEvent .shouldCommit () ) {
65
65
sessionOpenEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -82,10 +82,10 @@ public SessionClosedEvent beginSessionClosedEvent() {
82
82
83
83
@ Override
84
84
public void completeSessionClosedEvent (
85
- HibernateMonitoringEvent event ,
85
+ HibernateMonitoringEvent monitoringEvent ,
86
86
SharedSessionContractImplementor session ) {
87
- if ( event != null ) {
88
- final SessionClosedEvent sessionClosedEvent = (SessionClosedEvent ) event ;
87
+ if ( monitoringEvent != null ) {
88
+ final SessionClosedEvent sessionClosedEvent = (SessionClosedEvent ) monitoringEvent ;
89
89
sessionClosedEvent .end ();
90
90
if ( sessionClosedEvent .shouldCommit () ) {
91
91
sessionClosedEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -108,11 +108,11 @@ public JdbcConnectionAcquisitionEvent beginJdbcConnectionAcquisitionEvent() {
108
108
109
109
@ Override
110
110
public void completeJdbcConnectionAcquisitionEvent (
111
- HibernateMonitoringEvent event ,
111
+ HibernateMonitoringEvent monitoringEvent ,
112
112
SharedSessionContractImplementor session ,
113
113
Object tenantId ) {
114
- if ( event != null ) {
115
- final JdbcConnectionAcquisitionEvent jdbcConnectionAcquisitionEvent = (JdbcConnectionAcquisitionEvent ) event ;
114
+ if ( monitoringEvent != null ) {
115
+ final JdbcConnectionAcquisitionEvent jdbcConnectionAcquisitionEvent = (JdbcConnectionAcquisitionEvent ) monitoringEvent ;
116
116
jdbcConnectionAcquisitionEvent .end ();
117
117
if ( jdbcConnectionAcquisitionEvent .shouldCommit () ) {
118
118
jdbcConnectionAcquisitionEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -138,11 +138,11 @@ public JdbcConnectionReleaseEvent beginJdbcConnectionReleaseEvent() {
138
138
139
139
@ Override
140
140
public void completeJdbcConnectionReleaseEvent (
141
- HibernateMonitoringEvent event ,
141
+ HibernateMonitoringEvent monitoringEvent ,
142
142
SharedSessionContractImplementor session ,
143
143
Object tenantId ) {
144
- if ( event != null ) {
145
- final JdbcConnectionReleaseEvent jdbcConnectionReleaseEvent = (JdbcConnectionReleaseEvent ) event ;
144
+ if ( monitoringEvent != null ) {
145
+ final JdbcConnectionReleaseEvent jdbcConnectionReleaseEvent = (JdbcConnectionReleaseEvent ) monitoringEvent ;
146
146
jdbcConnectionReleaseEvent .end ();
147
147
if ( jdbcConnectionReleaseEvent .shouldCommit () ) {
148
148
jdbcConnectionReleaseEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -168,10 +168,10 @@ public JdbcPreparedStatementCreationEvent beginJdbcPreparedStatementCreationEven
168
168
169
169
@ Override
170
170
public void completeJdbcPreparedStatementCreationEvent (
171
- HibernateMonitoringEvent event ,
171
+ HibernateMonitoringEvent monitoringEvent ,
172
172
String preparedStatementSql ) {
173
- if ( event != null ) {
174
- final JdbcPreparedStatementCreationEvent jdbcPreparedStatementCreation = (JdbcPreparedStatementCreationEvent ) event ;
173
+ if ( monitoringEvent != null ) {
174
+ final JdbcPreparedStatementCreationEvent jdbcPreparedStatementCreation = (JdbcPreparedStatementCreationEvent ) monitoringEvent ;
175
175
jdbcPreparedStatementCreation .end ();
176
176
if ( jdbcPreparedStatementCreation .shouldCommit () ) {
177
177
jdbcPreparedStatementCreation .sql = preparedStatementSql ;
@@ -194,10 +194,10 @@ public JdbcPreparedStatementExecutionEvent beginJdbcPreparedStatementExecutionEv
194
194
195
195
@ Override
196
196
public void completeJdbcPreparedStatementExecutionEvent (
197
- HibernateMonitoringEvent event ,
197
+ HibernateMonitoringEvent monitoringEvent ,
198
198
String preparedStatementSql ) {
199
- if ( event != null ) {
200
- final JdbcPreparedStatementExecutionEvent jdbcPreparedStatementExecutionEvent = (JdbcPreparedStatementExecutionEvent ) event ;
199
+ if ( monitoringEvent != null ) {
200
+ final JdbcPreparedStatementExecutionEvent jdbcPreparedStatementExecutionEvent = (JdbcPreparedStatementExecutionEvent ) monitoringEvent ;
201
201
jdbcPreparedStatementExecutionEvent .end ();
202
202
if ( jdbcPreparedStatementExecutionEvent .shouldCommit () ) {
203
203
jdbcPreparedStatementExecutionEvent .sql = preparedStatementSql ;
@@ -220,10 +220,10 @@ public JdbcBatchExecutionEvent beginJdbcBatchExecutionEvent() {
220
220
221
221
@ Override
222
222
public void completeJdbcBatchExecutionEvent (
223
- HibernateMonitoringEvent event ,
223
+ HibernateMonitoringEvent monitoringEvent ,
224
224
String statementSql ) {
225
- if ( event != null ) {
226
- final JdbcBatchExecutionEvent jdbcBatchExecutionEvent = (JdbcBatchExecutionEvent ) event ;
225
+ if ( monitoringEvent != null ) {
226
+ final JdbcBatchExecutionEvent jdbcBatchExecutionEvent = (JdbcBatchExecutionEvent ) monitoringEvent ;
227
227
jdbcBatchExecutionEvent .end ();
228
228
if ( jdbcBatchExecutionEvent .shouldCommit () ) {
229
229
jdbcBatchExecutionEvent .sql = statementSql ;
@@ -246,13 +246,13 @@ public HibernateMonitoringEvent beginCachePutEvent() {
246
246
247
247
@ Override
248
248
public void completeCachePutEvent (
249
- HibernateMonitoringEvent event ,
249
+ HibernateMonitoringEvent monitoringEvent ,
250
250
SharedSessionContractImplementor session ,
251
251
Region region ,
252
252
boolean cacheContentChanged ,
253
253
CacheActionDescription description ) {
254
- if ( event != null ) {
255
- final CachePutEvent cachePutEvent = (CachePutEvent ) event ;
254
+ if ( monitoringEvent != null ) {
255
+ final CachePutEvent cachePutEvent = (CachePutEvent ) monitoringEvent ;
256
256
cachePutEvent .end ();
257
257
if ( cachePutEvent .shouldCommit () ) {
258
258
cachePutEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -266,14 +266,14 @@ public void completeCachePutEvent(
266
266
267
267
@ Override
268
268
public void completeCachePutEvent (
269
- HibernateMonitoringEvent event ,
269
+ HibernateMonitoringEvent monitoringEvent ,
270
270
SharedSessionContractImplementor session ,
271
271
CachedDomainDataAccess cachedDomainDataAccess ,
272
272
EntityPersister persister ,
273
273
boolean cacheContentChanged ,
274
274
CacheActionDescription description ) {
275
275
completeCachePutEvent (
276
- event ,
276
+ monitoringEvent ,
277
277
session ,
278
278
cachedDomainDataAccess ,
279
279
persister ,
@@ -285,15 +285,15 @@ public void completeCachePutEvent(
285
285
286
286
@ Override
287
287
public void completeCachePutEvent (
288
- HibernateMonitoringEvent event ,
288
+ HibernateMonitoringEvent monitoringEvent ,
289
289
SharedSessionContractImplementor session ,
290
290
CachedDomainDataAccess cachedDomainDataAccess ,
291
291
EntityPersister persister ,
292
292
boolean cacheContentChanged ,
293
293
boolean isNatualId ,
294
294
CacheActionDescription description ) {
295
- if ( event != null ) {
296
- final CachePutEvent cachePutEvent = (CachePutEvent ) event ;
295
+ if ( monitoringEvent != null ) {
296
+ final CachePutEvent cachePutEvent = (CachePutEvent ) monitoringEvent ;
297
297
cachePutEvent .end ();
298
298
if ( cachePutEvent .shouldCommit () ) {
299
299
cachePutEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -309,14 +309,14 @@ public void completeCachePutEvent(
309
309
310
310
@ Override
311
311
public void completeCachePutEvent (
312
- HibernateMonitoringEvent event ,
312
+ HibernateMonitoringEvent monitoringEvent ,
313
313
SharedSessionContractImplementor session ,
314
314
CachedDomainDataAccess cachedDomainDataAccess ,
315
315
CollectionPersister persister ,
316
316
boolean cacheContentChanged ,
317
317
CacheActionDescription description ) {
318
- if ( event != null ) {
319
- final CachePutEvent cachePutEvent = (CachePutEvent ) event ;
318
+ if ( monitoringEvent != null ) {
319
+ final CachePutEvent cachePutEvent = (CachePutEvent ) monitoringEvent ;
320
320
cachePutEvent .end ();
321
321
if ( cachePutEvent .shouldCommit () ) {
322
322
cachePutEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -343,12 +343,12 @@ public HibernateMonitoringEvent beginCacheGetEvent() {
343
343
344
344
@ Override
345
345
public void completeCacheGetEvent (
346
- HibernateMonitoringEvent event ,
346
+ HibernateMonitoringEvent monitoringEvent ,
347
347
SharedSessionContractImplementor session ,
348
348
Region region ,
349
349
boolean hit ) {
350
- if ( event != null ) {
351
- final CacheGetEvent cacheGetEvent = (CacheGetEvent ) event ;
350
+ if ( monitoringEvent != null ) {
351
+ final CacheGetEvent cacheGetEvent = (CacheGetEvent ) monitoringEvent ;
352
352
cacheGetEvent .end ();
353
353
if ( cacheGetEvent .shouldCommit () ) {
354
354
cacheGetEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -361,14 +361,14 @@ public void completeCacheGetEvent(
361
361
362
362
@ Override
363
363
public void completeCacheGetEvent (
364
- HibernateMonitoringEvent event ,
364
+ HibernateMonitoringEvent monitoringEvent ,
365
365
SharedSessionContractImplementor session ,
366
366
Region region ,
367
367
EntityPersister persister ,
368
368
boolean isNaturalKey ,
369
369
boolean hit ) {
370
- if ( event != null ) {
371
- final CacheGetEvent cacheGetEvent = (CacheGetEvent ) event ;
370
+ if ( monitoringEvent != null ) {
371
+ final CacheGetEvent cacheGetEvent = (CacheGetEvent ) monitoringEvent ;
372
372
cacheGetEvent .end ();
373
373
if ( cacheGetEvent .shouldCommit () ) {
374
374
cacheGetEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -383,13 +383,13 @@ public void completeCacheGetEvent(
383
383
384
384
@ Override
385
385
public void completeCacheGetEvent (
386
- HibernateMonitoringEvent event ,
386
+ HibernateMonitoringEvent monitoringEvent ,
387
387
SharedSessionContractImplementor session ,
388
388
Region region ,
389
389
CollectionPersister persister ,
390
390
boolean hit ) {
391
- if ( event != null ) {
392
- final CacheGetEvent cacheGetEvent = (CacheGetEvent ) event ;
391
+ if ( monitoringEvent != null ) {
392
+ final CacheGetEvent cacheGetEvent = (CacheGetEvent ) monitoringEvent ;
393
393
cacheGetEvent .end ();
394
394
if ( cacheGetEvent .shouldCommit () ) {
395
395
cacheGetEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -422,18 +422,18 @@ public void completeFlushEvent(
422
422
423
423
@ Override
424
424
public void completeFlushEvent (
425
- HibernateMonitoringEvent hibernateMonitoringEvent ,
426
- org .hibernate .event .spi .FlushEvent event ,
425
+ HibernateMonitoringEvent monitoringEvent ,
426
+ org .hibernate .event .spi .FlushEvent hibernateFlushEvent ,
427
427
boolean autoFlush ) {
428
- if ( hibernateMonitoringEvent != null ) {
429
- final FlushEvent flushEvent = (FlushEvent ) hibernateMonitoringEvent ;
430
- flushEvent .end ();
431
- if ( flushEvent .shouldCommit () ) {
432
- flushEvent .sessionIdentifier = getSessionIdentifier ( event .getSession () );
433
- flushEvent .numberOfEntitiesProcessed = event .getNumberOfEntitiesProcessed ();
434
- flushEvent .numberOfCollectionsProcessed = event .getNumberOfCollectionsProcessed ();
435
- flushEvent .isAutoFlush = autoFlush ;
436
- flushEvent .commit ();
428
+ if ( monitoringEvent != null ) {
429
+ final FlushEvent jfrFlushEvent = (FlushEvent ) monitoringEvent ;
430
+ jfrFlushEvent .end ();
431
+ if ( jfrFlushEvent .shouldCommit () ) {
432
+ jfrFlushEvent .sessionIdentifier = getSessionIdentifier ( hibernateFlushEvent .getSession () );
433
+ jfrFlushEvent .numberOfEntitiesProcessed = hibernateFlushEvent .getNumberOfEntitiesProcessed ();
434
+ jfrFlushEvent .numberOfCollectionsProcessed = hibernateFlushEvent .getNumberOfCollectionsProcessed ();
435
+ jfrFlushEvent .isAutoFlush = autoFlush ;
436
+ jfrFlushEvent .commit ();
437
437
}
438
438
}
439
439
}
@@ -452,17 +452,17 @@ public PartialFlushEvent beginPartialFlushEvent() {
452
452
453
453
@ Override
454
454
public void completePartialFlushEvent (
455
- HibernateMonitoringEvent hibernateMonitoringEvent ,
456
- AutoFlushEvent event ) {
457
- if ( event != null && hibernateMonitoringEvent != null ) {
458
- final PartialFlushEvent flushEvent = (PartialFlushEvent ) hibernateMonitoringEvent ;
459
- flushEvent .end ();
460
- if ( flushEvent .shouldCommit () ) {
461
- flushEvent .sessionIdentifier = getSessionIdentifier ( event .getSession () );
462
- flushEvent .numberOfEntitiesProcessed = event .getNumberOfEntitiesProcessed ();
463
- flushEvent .numberOfCollectionsProcessed = event .getNumberOfCollectionsProcessed ();
464
- flushEvent .isAutoFlush = true ;
465
- flushEvent .commit ();
455
+ HibernateMonitoringEvent monitoringEvent ,
456
+ AutoFlushEvent hibernateAutoFlushEvent ) {
457
+ if ( monitoringEvent != null ) {
458
+ final PartialFlushEvent jfrPartialFlushEvent = (PartialFlushEvent ) monitoringEvent ;
459
+ jfrPartialFlushEvent .end ();
460
+ if ( jfrPartialFlushEvent .shouldCommit () ) {
461
+ jfrPartialFlushEvent .sessionIdentifier = getSessionIdentifier ( hibernateAutoFlushEvent .getSession () );
462
+ jfrPartialFlushEvent .numberOfEntitiesProcessed = hibernateAutoFlushEvent .getNumberOfEntitiesProcessed ();
463
+ jfrPartialFlushEvent .numberOfCollectionsProcessed = hibernateAutoFlushEvent .getNumberOfCollectionsProcessed ();
464
+ jfrPartialFlushEvent .isAutoFlush = true ;
465
+ jfrPartialFlushEvent .commit ();
466
466
}
467
467
}
468
468
}
@@ -481,13 +481,13 @@ public DirtyCalculationEvent beginDirtyCalculationEvent() {
481
481
482
482
@ Override
483
483
public void completeDirtyCalculationEvent (
484
- HibernateMonitoringEvent event ,
484
+ HibernateMonitoringEvent monitoringEvent ,
485
485
SharedSessionContractImplementor session ,
486
486
EntityPersister persister ,
487
487
EntityEntry entry ,
488
488
int [] dirtyProperties ) {
489
- if ( event != null ) {
490
- final DirtyCalculationEvent dirtyCalculationEvent = (DirtyCalculationEvent ) event ;
489
+ if ( monitoringEvent != null ) {
490
+ final DirtyCalculationEvent dirtyCalculationEvent = (DirtyCalculationEvent ) monitoringEvent ;
491
491
dirtyCalculationEvent .end ();
492
492
if ( dirtyCalculationEvent .shouldCommit () ) {
493
493
dirtyCalculationEvent .sessionIdentifier = getSessionIdentifier ( session );
@@ -513,10 +513,10 @@ public PrePartialFlushEvent beginPrePartialFlush() {
513
513
514
514
@ Override
515
515
public void completePrePartialFlush (
516
- HibernateMonitoringEvent event ,
516
+ HibernateMonitoringEvent monitoringEvent ,
517
517
SharedSessionContractImplementor session ) {
518
- if ( event != null ) {
519
- final PrePartialFlushEvent prePartialFlushEvent = (PrePartialFlushEvent ) event ;
518
+ if ( monitoringEvent != null ) {
519
+ final PrePartialFlushEvent prePartialFlushEvent = (PrePartialFlushEvent ) monitoringEvent ;
520
520
prePartialFlushEvent .end ();
521
521
if ( prePartialFlushEvent .shouldCommit () ) {
522
522
prePartialFlushEvent .sessionIdentifier = getSessionIdentifier ( session );
0 commit comments