public abstract class AbstractHibernateSpaceDataSource extends ManagedEntriesSpaceDataSource
SpaceDataSource implementations.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
augmentInitialLoadEntries, clusterInfo, initialLoadQueries, initialLoadQueryScanningBasePackages| Constructor and Description |
|---|
AbstractHibernateSpaceDataSource(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 |
|---|---|
protected DataIterator |
createInitialLoadIterator(DataIterator[] iterators)
A helper method that creates the initial load iterator using the
ConcurrentMultiDataIterator with the provided #setInitialLoadThreadPoolSize(int) thread pool size. |
protected int |
getFetchSize() |
protected int |
getInitialLoadChunkSize() |
protected Set<String> |
getInitialLoadEntries() |
Iterable<String> |
getManagedEntries() |
protected org.hibernate.SessionFactory |
getSessionFactory() |
DataIterator<SpaceTypeDescriptor> |
initialMetadataLoad()
This method is invoked on space initialization (before
SpaceDataSource.initialDataLoad() is invoked)
and is used for introducing data types kept in the data source to the space. |
protected boolean |
isManagedEntry(String entityName)
Returns if the given entity name is part of the
getManagedEntries() list. |
protected boolean |
isPerformOrderById() |
protected boolean |
isUseScrollableResultSet() |
protected void |
obtainInitialLoadQueries()
This method scans the classpath using Spring's
ClassPathScanningCandidateComponentProvider. |
boolean |
supportsInheritance()
Determines whether this implementation supports types inheritance.
|
createInitialLoadQuery, getInitialLoadQueries, setClusterInfo, setInitialLoadQueryScanningBasePackagesgetById, getDataIterator, getDataIteratorByIds, initialDataLoadpublic AbstractHibernateSpaceDataSource(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)
protected int getInitialLoadChunkSize()
protected boolean isUseScrollableResultSet()
protected org.hibernate.SessionFactory getSessionFactory()
protected int getFetchSize()
protected boolean isPerformOrderById()
protected DataIterator createInitialLoadIterator(DataIterator[] iterators)
ConcurrentMultiDataIterator with the provided #setInitialLoadThreadPoolSize(int) thread pool size.protected boolean isManagedEntry(String entityName)
getManagedEntries() list.public boolean supportsInheritance()
SpaceDataSourceIf types inheritance is
not supported - SpaceDataSource.getDataIterator(DataSourceQuery) will be invoked for each derived
type of the query's data type. Otherwise a single SpaceDataSource.getDataIterator(DataSourceQuery)
invocation will be made for the query.
supportsInheritance in class SpaceDataSourceSpaceDataSource implementation supports types inheritance,
otherwise false.public Iterable<String> getManagedEntries()
getManagedEntries in class ManagedEntriesSpaceDataSourcepublic DataIterator<SpaceTypeDescriptor> initialMetadataLoad()
SpaceDataSourceSpaceDataSource.initialDataLoad() is invoked)
and is used for introducing data types kept in the data source to the space. Please note that derived types should be returned after their super types from the iterator.
It is
possible to create a SpaceTypeDescriptor using SpaceTypeDescriptorBuilder.
initialMetadataLoad in class ClusterInfoAwareSpaceDataSourceDataIterator instance which contains all SpaceTypeDescriptor
instances to be introduced to the Space upon its initialization - null is treated as an empty
iterator.protected void obtainInitialLoadQueries()
ClusterInfoAwareSpaceDataSourceClassPathScanningCandidateComponentProvider.
This scanner uses the logic in the #isClassMatch method to retrieve names of classes that
contain a method annotated with SpaceInitialLoadQuery.
This collection of class names is then handled in such a way that each annotated method is
validated, examined and eventually invoked to obtain the specific type's initial load query.
obtainInitialLoadQueries in class ClusterInfoAwareSpaceDataSourceCopyright © GigaSpaces.