org.openspaces.persistency.hibernate
Class DefaultHibernateSpaceDataSource
java.lang.Object
com.gigaspaces.datasource.SpaceDataSource
org.openspaces.persistency.ClusterInfoAwareSpaceDataSource
org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
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
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)
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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
.
Copyright © GigaSpaces.