org.openspaces.persistency.hibernate
Class DefaultHibernateSpaceSynchronizationEndpoint
java.lang.Object
com.gigaspaces.sync.SpaceSynchronizationEndpoint
org.openspaces.persistency.patterns.ManagedEntriesSpaceSynchronizationEndpoint
org.openspaces.persistency.hibernate.AbstractHibernateSpaceSynchronizationEndpoint
org.openspaces.persistency.hibernate.DefaultHibernateSpaceSynchronizationEndpoint
public class DefaultHibernateSpaceSynchronizationEndpoint
- extends AbstractHibernateSpaceSynchronizationEndpoint
The default Hibernate SpaceSynchronizationEndpoint
implementation. Based on Hibernate Session
.
- Since:
- 9.5
- Author:
- eitany
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHibernateSpaceSynchronizationEndpoint
public DefaultHibernateSpaceSynchronizationEndpoint(org.hibernate.SessionFactory sessionFactory,
Set<String> managedEntries,
boolean useMerge,
boolean deleteById)
onTransactionSynchronization
public void onTransactionSynchronization(TransactionData transactionData)
- Perform the given transaction changes using Hibernate
Session
.
Note, this implementation relies on Hibernate NonUniqueObjectException
in case
the entity is already associated with the given session, and in such a case, will result in performing
merge operation (which is more expensive).
- Overrides:
onTransactionSynchronization
in class SpaceSynchronizationEndpoint
- Parameters:
transactionData
- the transaction data
onOperationsBatchSynchronization
public void onOperationsBatchSynchronization(OperationsBatchData batchData)
- Perform the given batch changes using Hibernate
Session
.
Note, this implementation relies on Hibernate NonUniqueObjectException
in case
the entity is already associated with the given session, and in such a case, will result in performing
merge operation (which is more expensive).
- Overrides:
onOperationsBatchSynchronization
in class SpaceSynchronizationEndpoint
- Parameters:
batchData
- the batched operations data
getIdentifier
protected Serializable getIdentifier(Object o)
- Extracts and returns the hibernate object identifier
- Parameters:
o
-
- Returns:
- serializable
Copyright © GigaSpaces.