|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gigaspaces.datasource.SpaceDataSource org.openspaces.persistency.ClusterInfoAwareSpaceDataSource org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
public abstract class AbstractHibernateSpaceDataSource
A base class for Hibernate based SpaceDataSource
implementations.
Field Summary | |
---|---|
protected static Log |
logger
|
Fields inherited from class org.openspaces.persistency.ClusterInfoAwareSpaceDataSource |
---|
augmentInitialLoadEntries, clusterInfo, initialLoadQueries, initialLoadQueryScanningBasePackages |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.openspaces.persistency.ClusterInfoAwareSpaceDataSource |
---|
createInitialLoadQuery, getInitialLoadQueries, setClusterInfo, setInitialLoadQueryScanningBasePackages |
Methods inherited from class com.gigaspaces.datasource.SpaceDataSource |
---|
getById, getDataIterator, getDataIteratorByIds, initialDataLoad |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
Constructor Detail |
---|
public 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)
Method Detail |
---|
protected Set<String> getInitialLoadEntries()
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()
SpaceDataSource
If 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 SpaceDataSource
SpaceDataSource
implementation supports types inheritance, otherwise false.public Iterable<String> getManagedEntries()
getManagedEntries
in class ManagedEntriesSpaceDataSource
public DataIterator<SpaceTypeDescriptor> initialMetadataLoad()
SpaceDataSource
SpaceDataSource.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 ClusterInfoAwareSpaceDataSource
DataIterator
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()
ClusterInfoAwareSpaceDataSource
ClassPathScanningCandidateComponentProvider
.
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 ClusterInfoAwareSpaceDataSource
|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |