GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.hibernate
Class AbstractHibernateSpaceDataSource

java.lang.Object
  extended by com.gigaspaces.datasource.SpaceDataSource
      extended by org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
          extended by org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
Direct Known Subclasses:
DefaultHibernateSpaceDataSource, StatelessHibernateSpaceDataSource

public abstract class AbstractHibernateSpaceDataSource
extends ManagedEntriesSpaceDataSource

A base class for Hibernate based SpaceDataSource implementations.

Since:
9.5
Author:
eitany

Field Summary
protected static Log logger
           
 
Constructor Summary
AbstractHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory, Set<String> managedEntries, int fetchSize, boolean performOrderById, String[] initialLoadEntries, int initialLoadThreadPoolSize, int initialLoadChunkSize, boolean useScrollableResultSet)
           
 
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  String[] getInitialLoadEntries()
           
 Iterable<String> getManagedEntries()
           
protected  org.hibernate.SessionFactory getSessionFactory()
           
protected  boolean isManagedEntry(String entityName)
          Returns if the given entity name is part of the getManagedEntries() list.
protected  boolean isPerformOrderById()
           
protected  boolean isUseScrollableResultSet()
           
 boolean supportsInheritance()
          Determines whether this implementation supports types inheritance.
 
Methods inherited from class com.gigaspaces.datasource.SpaceDataSource
getById, getDataIterator, getDataIteratorByIds, initialDataLoad, initialMetadataLoad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
Constructor Detail

AbstractHibernateSpaceDataSource

public AbstractHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
                                        Set<String> managedEntries,
                                        int fetchSize,
                                        boolean performOrderById,
                                        String[] initialLoadEntries,
                                        int initialLoadThreadPoolSize,
                                        int initialLoadChunkSize,
                                        boolean useScrollableResultSet)
Method Detail

getInitialLoadEntries

protected String[] getInitialLoadEntries()

getInitialLoadChunkSize

protected int getInitialLoadChunkSize()

isUseScrollableResultSet

protected boolean isUseScrollableResultSet()

getSessionFactory

protected org.hibernate.SessionFactory getSessionFactory()

getFetchSize

protected int getFetchSize()

isPerformOrderById

protected boolean isPerformOrderById()

createInitialLoadIterator

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.


isManagedEntry

protected boolean isManagedEntry(String entityName)
Returns if the given entity name is part of the getManagedEntries() list.


supportsInheritance

public boolean supportsInheritance()
Description copied from class: SpaceDataSource
Determines whether this implementation supports types inheritance.

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.

Overrides:
supportsInheritance in class SpaceDataSource
Returns:
true if this SpaceDataSource implementation supports types inheritance, otherwise false.

getManagedEntries

public Iterable<String> getManagedEntries()
Specified by:
getManagedEntries in class ManagedEntriesSpaceDataSource

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.