Class SpaceDataSourceSplitter
java.lang.Object
com.gigaspaces.datasource.SpaceDataSource
org.openspaces.persistency.patterns.SpaceDataSourceSplitter
A space data source that redirects the query operations to the given data source that can handle
the given type.
- Since:
- 9.5
- Author:
- eitany
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetById(DataSourceIdQuery idQuery) Delegates the query to the corresponding data sourcegetDataIterator(DataSourceQuery query) Delegates the query to the corresponding data sourcegetDataIteratorByIds(DataSourceIdsQuery idsQuery) Delegates the query to the corresponding data sourceprotected SpaceDataSourcegetDataSource(String entry) Iterates through all the given data sources and assembles their respectiveDataIterators fromSpaceDataSource.initialDataLoad().Iterates through all the given data sources and assembles their respectiveDataIterators fromSpaceDataSource.initialMetadataLoad().voidsetInitalLoadThreadPoolSize(int initalLoadThreadPoolSize) Methods inherited from class com.gigaspaces.datasource.SpaceDataSource
getPartitionRoutingInfo, setPartitionRoutingInfo, supportsInheritance
-
Constructor Details
-
SpaceDataSourceSplitter
-
-
Method Details
-
setInitalLoadThreadPoolSize
public void setInitalLoadThreadPoolSize(int initalLoadThreadPoolSize) -
getDataSource
-
initialDataLoad
Iterates through all the given data sources and assembles their respectiveDataIterators fromSpaceDataSource.initialDataLoad(). Constructs aConcurrentMultiDataIteratoron top of them.- Overrides:
initialDataLoadin classSpaceDataSource- Returns:
- A
DataIteratorinstance which contains all data to be written to Space upon its initialization - null is treated as an empty iterator.
-
initialMetadataLoad
Iterates through all the given data sources and assembles their respectiveDataIterators fromSpaceDataSource.initialMetadataLoad(). Constructs aSerialMultiDataIteratoron top of them.- Overrides:
initialMetadataLoadin classSpaceDataSource- Returns:
- A
DataIteratorinstance which contains allSpaceTypeDescriptorinstances to be introduced to the Space upon its initialization - null is treated as an empty iterator.
-
getDataIterator
Delegates the query to the corresponding data source- Overrides:
getDataIteratorin classSpaceDataSource- Parameters:
query- TheDataSourceQueryto get results for.- Returns:
- A
DataIteratorinstance contains results for the providedDataSourceQuery.
-
getById
Delegates the query to the corresponding data source- Overrides:
getByIdin classSpaceDataSource- Parameters:
idQuery- TheDataSourceIdQueryto get a result for.- Returns:
- A result from the
SpaceDataSourcewhich matches the providedDataSourceIdQuery.
-
getDataIteratorByIds
Delegates the query to the corresponding data source- Overrides:
getDataIteratorByIdsin classSpaceDataSource- Parameters:
idsQuery- TheDataSourceIdsQueryto get a result for.- Returns:
- A
DataIteratorinstance contains results for the providedDataSourceIdsQuery.
-