GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.hibernate
Class StatelessHibernateSpaceDataSource

java.lang.Object
  extended by com.gigaspaces.datasource.SpaceDataSource
      extended by org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
          extended by org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
              extended by org.openspaces.persistency.hibernate.StatelessHibernateSpaceDataSource

public class StatelessHibernateSpaceDataSource
extends AbstractHibernateSpaceDataSource

A SpaceDataSource 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.AbstractHibernateSpaceDataSource
logger
 
Constructor Summary
StatelessHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory, Set<String> managedEntries, int fetchSize, boolean performOrderById, String[] initialLoadEntries, int initialLoadThreadPoolSize, int initialLoadChunkSize, boolean useScrollableResultSet)
           
 
Method Summary
 DataIterator getDataIterator(DataSourceQuery query)
          Returns a StatelessListQueryDataIterator for the given query.
 DataIterator initialDataLoad()
          Performs the initial load operation.
 
Methods inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
createInitialLoadIterator, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getSessionFactory, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, supportsInheritance
 
Methods inherited from class com.gigaspaces.datasource.SpaceDataSource
getById, getDataIteratorByIds, initialMetadataLoad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatelessHibernateSpaceDataSource

public StatelessHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
                                         Set<String> managedEntries,
                                         int fetchSize,
                                         boolean performOrderById,
                                         String[] initialLoadEntries,
                                         int initialLoadThreadPoolSize,
                                         int initialLoadChunkSize,
                                         boolean useScrollableResultSet)
Method Detail

initialDataLoad

public DataIterator initialDataLoad()
Performs the initial load operation. Iterates over the #setInitialLoadEntries(String[]) inital load entries. If AbstractHibernateSpaceDataSource.getInitialLoadChunkSize() is set to -1, will use StatelessScrollableDataIterator for each entity. If AbstractHibernateSpaceDataSource.getInitialLoadChunkSize() is set to a non -1 value, will use the StatelessChunkScrollableDataIterator.

Overrides:
initialDataLoad in class SpaceDataSource
Returns:
A DataIterator instance which contains all data to be written to Space upon its initialization - null is treated as an empty iterator.

getDataIterator

public DataIterator getDataIterator(DataSourceQuery query)
Returns a StatelessListQueryDataIterator for the given query.

Overrides:
getDataIterator in class SpaceDataSource
Parameters:
query - The DataSourceQuery to get results for.
Returns:
A DataIterator instance contains results for the provided DataSourceQuery.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.