public class Hibernate5StatelessSessionBatchProcessor extends AbstractHibernateBatchProcessor<org.hibernate.StatelessSession> implements StatelessSessionBatchProcessor
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 documentationsessionFactorybatchSize, log| Constructor and Description |
|---|
Hibernate5StatelessSessionBatchProcessor(org.hibernate.SessionFactory sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
auditOperations(List<AuditLogChangesetEntity> changesetEntities) |
protected void |
clearSession() |
protected void |
closeSession() |
protected void |
flushSession() |
protected org.hibernate.StatelessSession |
getSession()
Subclasses should use this method to provide the session to be used with any implementations of
HibernateOperation. |
protected org.hibernate.StatelessSession |
openSession() |
afterProcessBatch, afterProcessCollection, afterProcessIndividual, beforeProcessBatch, beforeProcessCollection, beforeProcessIndividual, commitTransaction, rollbackProcessBatch, rollbackProcessIndividual, rollbackTransaction, startTransactionexecute, execute, setBatchSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecute, executepublic Hibernate5StatelessSessionBatchProcessor(org.hibernate.SessionFactory sessionFactory)
protected void auditOperations(List<AuditLogChangesetEntity> changesetEntities)
auditOperations in class AbstractBatchProcessor<org.hibernate.StatelessSession>protected org.hibernate.StatelessSession getSession()
AbstractBatchProcessorHibernateOperation.getSession in class AbstractBatchProcessor<org.hibernate.StatelessSession>protected void clearSession()
clearSession in class AbstractHibernateBatchProcessor<org.hibernate.StatelessSession>protected void closeSession()
closeSession in class AbstractHibernateBatchProcessor<org.hibernate.StatelessSession>protected void flushSession()
flushSession in class AbstractHibernateBatchProcessor<org.hibernate.StatelessSession>protected org.hibernate.StatelessSession openSession()
openSession in class AbstractHibernateBatchProcessor<org.hibernate.StatelessSession>Copyright © 2021 Atlassian. All rights reserved.