public class StatelessHibernateSpaceDataSource extends AbstractHibernateSpaceDataSource
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).
logger
augmentInitialLoadEntries, clusterInfo, initialLoadQueries, initialLoadQueryScanningBasePackages
Constructor and Description |
---|
StatelessHibernateSpaceDataSource(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) |
Modifier and Type | Method and Description |
---|---|
DataIterator |
getDataIterator(DataSourceQuery query)
Returns a
StatelessListQueryDataIterator
for the given query. |
DataIterator |
initialDataLoad()
Performs the initial load operation.
|
createInitialLoadIterator, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getSessionFactory, initialMetadataLoad, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, obtainInitialLoadQueries, supportsInheritance
createInitialLoadQuery, getInitialLoadQueries, setClusterInfo, setInitialLoadQueryScanningBasePackages
getById, getDataIteratorByIds
public StatelessHibernateSpaceDataSource(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)
public DataIterator initialDataLoad()
#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
.initialDataLoad
in class SpaceDataSource
DataIterator
instance which contains all data to be written to Space upon
its initialization - null is treated as an empty iterator.public DataIterator getDataIterator(DataSourceQuery query)
StatelessListQueryDataIterator
for the given query.getDataIterator
in class SpaceDataSource
query
- The DataSourceQuery
to get results for.DataIterator
instance contains results for the provided DataSourceQuery
.Copyright © GigaSpaces.