Interface DataProvider<T>

All Superinterfaces:
ManagedDataSource<T>
All Known Subinterfaces:
DataPersister<T>, ExternalDataSource<T>
All Known Implementing Classes:
DataProviderSplitter, DataStorage

@Deprecated public interface DataProvider<T> extends ManagedDataSource<T>
Deprecated.
since 9.5 - use SpaceDataSource instead.
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:
  • Field Summary

    Fields inherited from interface com.gigaspaces.datasource.ManagedDataSource

    NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
  • Method Summary

    Modifier and Type
    Method
    Description
    iterator(T template)
    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.
    read(T template)
    Deprecated.
    Read one object that matches the given template.

    Methods inherited from interface com.gigaspaces.datasource.ManagedDataSource

    init, initialLoad, shutdown
  • Method Details

    • 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.
      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.
      Returns:
      a DataIterator or null if no data was found that match the given template
      Throws:
      DataSourceException