StatelessHibernateSpaceDataSource
or StatelessHibernateSpaceSynchronizationEndpoint
instead.public class StatelessHibernateExternalDataSource extends AbstractHibernateExternalDataSource implements BulkDataPersister, SQLDataProvider
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).
HIBERNATE_CFG_PROPERTY, logger
NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
Constructor and Description |
---|
StatelessHibernateExternalDataSource()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
executeBulk(List<BulkItem> bulkItems)
Deprecated.
Perform the given bulk changes using Hibernate
StatelessSession . |
protected boolean |
exists(BulkItem bulkItem,
org.hibernate.StatelessSession session)
Deprecated.
|
DataIterator |
initialLoad()
Deprecated.
Performs the initial load operation.
|
DataIterator |
iterator(SQLQuery sqlQuery)
Deprecated.
Returns a
StatelessListQueryDataIterator
for the given query. |
createInitialLoadIterator, filterItemValue, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getPartialUpdateHQL, getSessionFactory, init, isManaged, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, setFetchSize, setInitialLoadChunkSize, setInitialLoadEntries, setInitialLoadThreadPoolSize, setManagedEntries, setPerformOrderById, setSessionFactory, setUseScrollableResultSet, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, shutdown
public StatelessHibernateExternalDataSource()
public void executeBulk(List<BulkItem> bulkItems) throws DataSourceException
StatelessSession
. First,
tries to perform "optimistic" operations without checking in advance for existence of certain
entity. If this fails, will try and perform the same operations again, simply with checking
if the entry exists or not.executeBulk
in interface BulkDataPersister
bulkItems
- list of data object and the operation to apply on that objectDataSourceException
- when the data store fails to persist the given list of objectspublic DataIterator iterator(SQLQuery sqlQuery) throws DataSourceException
StatelessListQueryDataIterator
for the given query.iterator
in interface SQLDataProvider
DataIterator
or null if no data was found that match the given templateDataSourceException
public DataIterator initialLoad() throws DataSourceException
AbstractHibernateExternalDataSource.setInitialLoadEntries(String[])
inital load entries. If AbstractHibernateExternalDataSource.getInitialLoadChunkSize()
is set to -1
, will
use StatelessScrollableDataIterator
for
each entity. If AbstractHibernateExternalDataSource.getInitialLoadChunkSize()
is set to a non -1
value,
will use the StatelessChunkScrollableDataIterator
.initialLoad
in interface ManagedDataSource
DataIterator
or null if no data should be loaded into spaceDataSourceException
protected boolean exists(BulkItem bulkItem, org.hibernate.StatelessSession session)
Copyright © GigaSpaces.