|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.persistency.hibernate.CriteriaHibernateSpaceDataSourceConfigurer
public class CriteriaHibernateSpaceDataSourceConfigurer
A configurer class which is used to configure a CriteriaHibernateSpaceDataSource
Field Summary | |
---|---|
protected Log |
logger
|
Constructor Summary | |
---|---|
CriteriaHibernateSpaceDataSourceConfigurer()
|
Method Summary | |
---|---|
CriteriaHibernateSpaceDataSource |
create()
Creates a DefaultHibernateExternalDataSource with the setup configuration. |
CriteriaHibernateSpaceDataSourceConfigurer |
fetchSize(int fetchSize)
Sets the fetch size that will be used when working with scrollable results. |
CriteriaHibernateSpaceDataSourceConfigurer |
initialLoadChunkSize(int initalLoadChunkSize)
By default, the initial load process will chunk large tables and will iterate over the table (entity) per chunk (concurrently). |
CriteriaHibernateSpaceDataSourceConfigurer |
initialLoadEntries(String... initialLoadEntries)
Sets a list of entries that will be used to perform the #initialLoad() operation. |
CriteriaHibernateSpaceDataSourceConfigurer |
initialLoadThreadPoolSize(int initialLoadThreadPoolSize)
The initial load operation uses the ConcurrentMultiDataIterator . |
CriteriaHibernateSpaceDataSourceConfigurer |
managedEntries(String... entries)
Sets all the entries this Hibernate data source will work with. |
CriteriaHibernateSpaceDataSourceConfigurer |
performOrderById(boolean performOrderById)
When performing initial load, this flag indicates if the generated query will order to results by the id. |
CriteriaHibernateSpaceDataSourceConfigurer |
sessionFactory(org.hibernate.SessionFactory sessionFactory)
Injects the Hibernate SessionFactory to be used with this data source. |
CriteriaHibernateSpaceDataSourceConfigurer |
useScrollableResultSet(boolean useScrollableResultSet)
Controls if scrollable result sets will be used with initial load operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log logger
Constructor Detail |
---|
public CriteriaHibernateSpaceDataSourceConfigurer()
Method Detail |
---|
public CriteriaHibernateSpaceDataSourceConfigurer sessionFactory(org.hibernate.SessionFactory sessionFactory)
public CriteriaHibernateSpaceDataSourceConfigurer managedEntries(String... entries)
This list is used to filter out entities when performing all data source operations exception for
the #initialLoad()
operation.
Usually, there is no need to explicitly set this.
public CriteriaHibernateSpaceDataSourceConfigurer fetchSize(int fetchSize)
100
.
Criteria.setFetchSize(int)
public CriteriaHibernateSpaceDataSourceConfigurer performOrderById(boolean performOrderById)
true
as it most times results in better initial load performance.
public CriteriaHibernateSpaceDataSourceConfigurer initialLoadEntries(String... initialLoadEntries)
#initialLoad()
operation. By default, will
try and build a sensible list based on Hibernate meta data.
Note, sometimes an explicit list should be provided. For example, if we have a class A and class B, and A has a relationship to B which is not component. If in the space, we only wish to have A, and have B just as a field in A (and not as an Entry), then we need to explicitly set the list just to A. By default, if we won't set it, it will result in two entries existing in the Space, A and B, with A having a field of B as well.
public CriteriaHibernateSpaceDataSourceConfigurer initialLoadThreadPoolSize(int initialLoadThreadPoolSize)
ConcurrentMultiDataIterator
.
This property allows to control the thread pool size of the concurrent multi data iterator. Defaults to
10
.
Note, this usually will map one to one to the number of open connections / cursors against the database.
public CriteriaHibernateSpaceDataSourceConfigurer initialLoadChunkSize(int initalLoadChunkSize)
100,000
. Batching can be disabled by setting -1
.
public CriteriaHibernateSpaceDataSourceConfigurer useScrollableResultSet(boolean useScrollableResultSet)
true
.
public CriteriaHibernateSpaceDataSource create()
DefaultHibernateExternalDataSource
with the setup configuration.
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |