org.openspaces.persistency.hibernate
Class StatelessHibernateSpaceDataSource
java.lang.Object
com.gigaspaces.datasource.SpaceDataSource
org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
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
Constructor Summary |
StatelessHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
Set<String> managedEntries,
int fetchSize,
boolean performOrderById,
String[] initialLoadEntries,
int initialLoadThreadPoolSize,
int initialLoadChunkSize,
boolean useScrollableResultSet)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatelessHibernateSpaceDataSource
public StatelessHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
Set<String> managedEntries,
int fetchSize,
boolean performOrderById,
String[] initialLoadEntries,
int initialLoadThreadPoolSize,
int initialLoadChunkSize,
boolean useScrollableResultSet)
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
.
Copyright © GigaSpaces.