Class Hibernate6StatelessSessionBatchProcessor
- All Implemented Interfaces:
BatchProcessor<org.hibernate.StatelessSession>
,StatelessSessionBatchProcessor
Hibernate6BatchProcessor
it runs
every collection in a separate session and every batch in a separate transaction. It does use a StatelessSession
under the covers, making it incompatible with HibernateOperation
instances for a regular session.
Care should be taken when using this class as stateless session bypasses Hibernate's event model, interceptors, doesn't implement a first-level cache, doesn't interact with the second level cache and the query cache and ignores collections. The operations performed will not cascade to associated instances. For more information please read The Hibernate documentation
-
Field Summary
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.hibernate6.AbstractHibernateBatchProcessor
sessionFactory
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.AbstractBatchProcessor
batchSize, log
-
Constructor Summary
ConstructorsConstructorDescriptionHibernate6StatelessSessionBatchProcessor
(org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
auditOperations
(List<AuditLogChangesetEntity> changesetEntities) protected void
protected void
protected void
protected org.hibernate.StatelessSession
Subclasses should use this method to provide the session to be used with any implementations ofHibernateOperation
.protected org.hibernate.StatelessSession
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.hibernate6.AbstractHibernateBatchProcessor
afterProcessBatch, afterProcessCollection, afterProcessIndividual, beforeProcessBatch, beforeProcessCollection, beforeProcessIndividual, commitTransaction, rollbackProcessBatch, rollbackProcessIndividual, rollbackTransaction, startTransaction
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.AbstractBatchProcessor
execute, execute, setBatchSize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessor
execute, execute
-
Constructor Details
-
Hibernate6StatelessSessionBatchProcessor
public Hibernate6StatelessSessionBatchProcessor(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
auditOperations
- Specified by:
auditOperations
in classAbstractBatchProcessor<org.hibernate.StatelessSession>
-
getSession
protected org.hibernate.StatelessSession getSession()Description copied from class:AbstractBatchProcessor
Subclasses should use this method to provide the session to be used with any implementations ofHibernateOperation
.- Specified by:
getSession
in classAbstractBatchProcessor<org.hibernate.StatelessSession>
-
clearSession
protected void clearSession()- Specified by:
clearSession
in classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-
closeSession
protected void closeSession()- Specified by:
closeSession
in classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-
flushSession
protected void flushSession()- Specified by:
flushSession
in classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-
openSession
protected org.hibernate.StatelessSession openSession()- Specified by:
openSession
in classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-