org.openspaces.persistency.hibernate
Class StatelessHibernateSpaceSynchronizationEndpoint
java.lang.Object
com.gigaspaces.sync.SpaceSynchronizationEndpoint
org.openspaces.persistency.patterns.ManagedEntriesSpaceSynchronizationEndpoint
org.openspaces.persistency.hibernate.AbstractHibernateSpaceSynchronizationEndpoint
org.openspaces.persistency.hibernate.StatelessHibernateSpaceSynchronizationEndpoint
public class StatelessHibernateSpaceSynchronizationEndpoint
- extends AbstractHibernateSpaceSynchronizationEndpoint
A SynchronizationEndpointInterceptor
implementation based on Hibernate StatelessSession
.
Note, stateless session is much faster than regular Hibernate session, but at the expense of not having
a first level cache, as well as not performing any cascading operations (both in read operations as well as
dirty operations).
- Since:
- 9.5
- Author:
- eitany
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatelessHibernateSpaceSynchronizationEndpoint
public StatelessHibernateSpaceSynchronizationEndpoint(org.hibernate.SessionFactory sessionFactory,
Set<String> managedEntries)
onTransactionSynchronization
public void onTransactionSynchronization(TransactionData transactionData)
- Perform the given transation changes using Hibernate
StatelessSession
. First, tries to perform
"optimistic" operations without checking in advance for existence of certain entity. If this fails, will
try and perform the same operations again, simply with checking if the entry exists or not.
- Overrides:
onTransactionSynchronization
in class SpaceSynchronizationEndpoint
- Parameters:
transactionData
- the transaction data
onOperationsBatchSynchronization
public void onOperationsBatchSynchronization(OperationsBatchData batchData)
- Perform the given batch changes using Hibernate
StatelessSession
. First, tries to perform
"optimistic" operations without checking in advance for existence of certain entity. If this fails, will
try and perform the same operations again, simply with checking if the entry exists or not.
- Overrides:
onOperationsBatchSynchronization
in class SpaceSynchronizationEndpoint
- Parameters:
batchData
- the batched operations data
Copyright © GigaSpaces.