com.gigaspaces.datasource
Interface DataProvider<T>
- Type Parameters:
T
-
- All Superinterfaces:
- ManagedDataSource<T>
- All Known Subinterfaces:
- DataPersister<T>, ExternalDataSource<T>
- All Known Implementing Classes:
- CriteriaHibernateExternalDataSource, DataProviderSplitter
Deprecated. since 9.5 - use SpaceDataSource
instead.
@Deprecated
public interface DataProvider<T>
- extends ManagedDataSource<T>
DataProvider is responsible for retrieving space data
from external data source.
This interfaces should be implemented for simple space access.
DataProvider is used by the space in the following scenarios:
- reads by UID.
- empty template.
- non-abstract class without extended match codes.
Any other scenario requires an implementation of the SQLDataProvider
.
Note: If SQLDataProvider
is implemented, the space will use it for all the read operations
instead of the DataProvider
.
Implement this interface only if you don't intend to use SQLQuery at all.
- Since:
- 6.0
- Author:
- anna
- See Also:
SQLDataProvider
Method Summary |
DataIterator<T> |
iterator(T template)
Deprecated. Create an iterator over all objects that match the given template. |
T |
read(T template)
Deprecated. Read one object that matches the given template. |
read
T read(T template)
throws DataSourceException
- Deprecated.
- Read one object that matches the given template.
Used by the space for read templates with UID.
- Parameters:
template
-
- Returns:
- matched object or null
- Throws:
DataSourceException
iterator
DataIterator<T> iterator(T template)
throws DataSourceException
- Deprecated.
- Create an iterator over all objects that match the given template.
Note: null value can be passed - in case of a null template or at initial space load.
If SQLDataProvider
interface is also implemented - the space will use SQLDataProvider
.iterator instead.
- Parameters:
template
-
- Returns:
- a
DataIterator
or null if no data was found that match the given template
- Throws:
DataSourceException
Copyright © GigaSpaces.