GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.hibernate
Class StatelessHibernateSpaceSynchronizationEndpoint

java.lang.Object
  extended by com.gigaspaces.sync.SpaceSynchronizationEndpoint
      extended by org.openspaces.persistency.patterns.ManagedEntriesSpaceSynchronizationEndpoint
          extended by org.openspaces.persistency.hibernate.AbstractHibernateSpaceSynchronizationEndpoint
              extended by 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

Field Summary
 
Fields inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceSynchronizationEndpoint
logger
 
Constructor Summary
StatelessHibernateSpaceSynchronizationEndpoint(org.hibernate.SessionFactory sessionFactory, Set<String> managedEntries)
           
 
Method Summary
 void onOperationsBatchSynchronization(OperationsBatchData batchData)
          Perform the given batch changes using Hibernate StatelessSession.
 void onTransactionSynchronization(TransactionData transactionData)
          Perform the given transation changes using Hibernate StatelessSession.
 
Methods inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceSynchronizationEndpoint
filterItemValue, getManagedEntries, getPartialUpdateHQL, getSessionFactory, isManaged, rollbackTx
 
Methods inherited from class com.gigaspaces.sync.SpaceSynchronizationEndpoint
afterOperationsBatchSynchronization, afterTransactionSynchronization, onAddIndex, onIntroduceType, onTransactionConsolidationFailure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatelessHibernateSpaceSynchronizationEndpoint

public StatelessHibernateSpaceSynchronizationEndpoint(org.hibernate.SessionFactory sessionFactory,
                                                      Set<String> managedEntries)
Method Detail

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

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.