public class EDSAdapterSpaceDataSource extends SpaceDataSource
| Constructor and Description |
|---|
EDSAdapterSpaceDataSource(DataStorage<Object> dataStorage,
boolean supportsInheritance) |
| Modifier and Type | Method and Description |
|---|---|
DataIterator<Object> |
getDataIterator(DataSourceQuery query)
This method is invoked whenever the space needs to read data which matches the provided
DataSourceQuery from the space data source. |
DataStorage<Object> |
getDataStorage() |
DataIterator<Object> |
initialDataLoad()
This method is invoked after
SpaceDataSource.initialMetadataLoad() and is used for pre fetching data
from the data source on space initialization. |
void |
initialize(Properties dataProperties) |
DataIterator<SpaceTypeDescriptor> |
initialMetadataLoad()
This method is invoked on space initialization (before
SpaceDataSource.initialDataLoad() is invoked)
and is used for introducing data types kept in the data source to the space. |
boolean |
supportsInheritance()
Determines whether this implementation supports types inheritance.
|
getById, getDataIteratorByIdspublic EDSAdapterSpaceDataSource(DataStorage<Object> dataStorage, boolean supportsInheritance)
public DataIterator<Object> initialDataLoad()
SpaceDataSourceSpaceDataSource.initialMetadataLoad() and is used for pre fetching data
from the data source on space initialization. The returned DataIterator instance
should contain POJOs or SpaceDocuments which their type was previously introduced to
the space on SpaceDataSource.initialMetadataLoad() invocation.
initialDataLoad in class SpaceDataSourceDataIterator instance which contains all data to be written to Space upon
its initialization - null is treated as an empty iterator.public DataIterator<SpaceTypeDescriptor> initialMetadataLoad()
SpaceDataSourceSpaceDataSource.initialDataLoad() is invoked)
and is used for introducing data types kept in the data source to the space. Please note that derived types should be returned after their super types from the iterator.
It is
possible to create a SpaceTypeDescriptor using SpaceTypeDescriptorBuilder.
initialMetadataLoad in class SpaceDataSourceDataIterator instance which contains all SpaceTypeDescriptor
instances to be introduced to the Space upon its initialization - null is treated as an empty
iterator.public DataIterator<Object> getDataIterator(DataSourceQuery query)
SpaceDataSourceDataSourceQuery from the space data source. If this implementation doesn't supports types inheritance this method will be invoked for each type in the inheritance tree of the queried type.
The implementation's type inheritance support can be determined
by overriding the SpaceDataSource.supportsInheritance() method.
getDataIterator in class SpaceDataSourcequery - The DataSourceQuery to get results for.DataIterator instance contains results for the provided DataSourceQuery.public boolean supportsInheritance()
SpaceDataSourceIf 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.
supportsInheritance in class SpaceDataSourceSpaceDataSource implementation supports types inheritance,
otherwise false.public void initialize(Properties dataProperties) throws DataSourceException
DataSourceExceptionpublic DataStorage<Object> getDataStorage()
Copyright © GigaSpaces.