Class Hibernate5StatelessSessionBatchProcessor
java.lang.Object
com.atlassian.crowd.util.persistence.hibernate.batch.AbstractBatchProcessor<org.hibernate.StatelessSession>
com.atlassian.crowd.util.persistence.hibernate.batch.hibernate5.AbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
com.atlassian.crowd.util.persistence.hibernate.batch.hibernate5.Hibernate5StatelessSessionBatchProcessor
- All Implemented Interfaces:
BatchProcessor<org.hibernate.StatelessSession>,StatelessSessionBatchProcessor
public class Hibernate5StatelessSessionBatchProcessor
extends AbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
implements StatelessSessionBatchProcessor
This is the Hibernate 5 implementation of the batch processor. Just like
Hibernate5BatchProcessor 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.hibernate5.AbstractHibernateBatchProcessor
sessionFactoryFields inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.AbstractBatchProcessor
batchSize, log -
Constructor Summary
ConstructorsConstructorDescriptionHibernate5StatelessSessionBatchProcessor(org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidauditOperations(List<AuditLogChangesetEntity> changesetEntities) protected voidprotected voidprotected voidprotected org.hibernate.StatelessSessionSubclasses should use this method to provide the session to be used with any implementations ofHibernateOperation.protected org.hibernate.StatelessSessionMethods inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.hibernate5.AbstractHibernateBatchProcessor
afterProcessBatch, afterProcessCollection, afterProcessIndividual, beforeProcessBatch, beforeProcessCollection, beforeProcessIndividual, commitTransaction, rollbackProcessBatch, rollbackProcessIndividual, rollbackTransaction, startTransactionMethods inherited from class com.atlassian.crowd.util.persistence.hibernate.batch.AbstractBatchProcessor
execute, execute, setBatchSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessor
execute, execute
-
Constructor Details
-
Hibernate5StatelessSessionBatchProcessor
public Hibernate5StatelessSessionBatchProcessor(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
auditOperations
- Specified by:
auditOperationsin classAbstractBatchProcessor<org.hibernate.StatelessSession>
-
getSession
protected org.hibernate.StatelessSession getSession()Description copied from class:AbstractBatchProcessorSubclasses should use this method to provide the session to be used with any implementations ofHibernateOperation.- Specified by:
getSessionin classAbstractBatchProcessor<org.hibernate.StatelessSession>
-
clearSession
protected void clearSession()- Specified by:
clearSessionin classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-
closeSession
protected void closeSession()- Specified by:
closeSessionin classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-
flushSession
protected void flushSession()- Specified by:
flushSessionin classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-
openSession
protected org.hibernate.StatelessSession openSession()- Specified by:
openSessionin classAbstractHibernateBatchProcessor<org.hibernate.StatelessSession>
-