Class SQLDataProviderSplitter
java.lang.Object
org.openspaces.persistency.patterns.AbstractManagedDataSourceSplitter
org.openspaces.persistency.patterns.BulkDataPersisterSplitter
org.openspaces.persistency.patterns.SQLDataProviderSplitter
- All Implemented Interfaces:
BulkDataPersister, ManagedDataSource, SQLDataProvider
@Deprecated
public class SQLDataProviderSplitter
extends BulkDataPersisterSplitter
implements SQLDataProvider
Deprecated.
A sql data provider that redirects the sql basded operatinos to the given data source that can
handle the given type.
- Author:
- kimchy
-
Field Summary
Fields inherited from class AbstractManagedDataSourceSplitter
dataSourcesFields inherited from interface ManagedDataSource
NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER -
Constructor Summary
ConstructorsConstructorDescriptionSQLDataProviderSplitter(ManagedDataSourceEntriesProvider[] dataSources) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Create an iterator over all objects that match the givenSQLQuery.Methods inherited from class BulkDataPersisterSplitter
executeBulkMethods inherited from class AbstractManagedDataSourceSplitter
getDataSource, init, initialLoad, setInitalLoadThreadPoolSize, shutdownMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ManagedDataSource
init, initialLoad, shutdown
-
Constructor Details
-
SQLDataProviderSplitter
Deprecated.
-
-
Method Details
-
iterator
Deprecated.Description copied from interface:SQLDataProviderCreate an iterator over all objects that match the given
SQLQuery. SQLQuery contains a string representation of SQL 'where' clause. The format matches thePreparedStatementformat(field1 = ? and field2 > ? and ....). The prepared values are accessible bySQLQuery.getPreparedValues() method Example implementation with SQL PreparedStatement:PreparedStatement st = con.prepareStatement(query.getSelectAllQuery()); int index = 0; if(query.hasPreparedValues()) { for(Iterator iter = query.getPreparedValues().iterator();iter.hasNext()) { st.setObject(++index,iter.next()); } } ResultSet rs = st.executeQuery(); return new ResultSetIterator(rs);- Specified by:
iteratorin interfaceSQLDataProvider- Returns:
- a
DataIteratoror null if no data was found that match the given template - Throws:
DataSourceException
-
SpaceDataSourceSplitterinstead.