GigaSpaces XAP 10.0.1 API

org.openspaces.persistency.hibernate
Class DefaultHibernateSpaceDataSource

java.lang.Object
  extended by com.gigaspaces.datasource.SpaceDataSource
      extended by org.openspaces.persistency.ClusterInfoAwareSpaceDataSource
          extended by org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
              extended by org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
                  extended by org.openspaces.persistency.hibernate.DefaultHibernateSpaceDataSource
All Implemented Interfaces:
ClusterInfoAware
Direct Known Subclasses:
CriteriaHibernateSpaceDataSource

public class DefaultHibernateSpaceDataSource
extends AbstractHibernateSpaceDataSource

The default Hibernate space data source implementation. Based on Hibernate Session.

Since:
9.5
Author:
eitany

Field Summary
 
Fields inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
logger
 
Fields inherited from class org.openspaces.persistency.ClusterInfoAwareSpaceDataSource
augmentInitialLoadEntries, clusterInfo, initialLoadQueries, initialLoadQueryScanningBasePackages
 
Constructor Summary
DefaultHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory, Set<String> managedEntries, int fetchSize, boolean performOrderById, String[] initialLoadEntries, int initialLoadThreadPoolSize, int initialLoadChunkSize, boolean useScrollableResultSet, String[] initialLoadQueryScanningBasePackages, boolean augmentInitialLoadEntries, ClusterInfo clusterInfo)
           
 
Method Summary
 DataIterator<Object> getDataIterator(DataSourceQuery query)
          Returns a DefaultListQueryDataIterator for the given sql query.
 DataIterator<Object> initialDataLoad()
          Performs the initial load operation.
 
Methods inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
createInitialLoadIterator, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getSessionFactory, initialMetadataLoad, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, obtainInitialLoadQueries, supportsInheritance
 
Methods inherited from class org.openspaces.persistency.ClusterInfoAwareSpaceDataSource
createInitialLoadQuery, getInitialLoadQueries, setClusterInfo, setInitialLoadQueryScanningBasePackages
 
Methods inherited from class com.gigaspaces.datasource.SpaceDataSource
getById, getDataIteratorByIds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHibernateSpaceDataSource

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

initialDataLoad

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

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<Object> getDataIterator(DataSourceQuery query)
Returns a DefaultListQueryDataIterator for the given sql 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 10.0.1 API

Copyright © GigaSpaces.