Package com.gigaspaces.datasource
Interface ManagedDataSource<T>
- All Known Subinterfaces:
DataPersister<T>,DataProvider<T>,ExternalDataSource<T>,ManagedDataSourceEntriesProvider,SQLDataProvider<T>
- All Known Implementing Classes:
AbstractManagedDataSourceDelegator,AbstractManagedDataSourceSplitter,BulkDataPersisterExceptionHandler,BulkDataPersisterSplitter,DataProviderSplitter,DataStorage,SharedIteratorSQLDataProviderDecorator,SQLDataProviderExceptionHandler,SQLDataProviderSplitter
Deprecated.
ManagedDataSource should be implemented when initialization and shutdown operations are needed by
the data source.
Usually in case of external databases - init() will establish a JDBC connection and shutdown() will close it.
If the implementation requires configuration, it can be configured in external properties file.
The content of this file is passed to init() The location of the properties file should be defined in the space schema or property:
space-config.ExternalDataSource.init-properties-file
Usually in case of external databases - init() will establish a JDBC connection and shutdown() will close it.
If the implementation requires configuration, it can be configured in external properties file.
The content of this file is passed to init() The location of the properties file should be defined in the space schema or property:
space-config.ExternalDataSource.init-properties-file
- Since:
- 6.0
- Author:
- anna
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(Properties prop) Deprecated.Initialize and configure the data source using given properties.
Called when space is started.
The properties are loaded from a file that can be defined in the space schema or as a property named:
space-config.ExternalDataSource.properties-file partitionId and number of partitions are also in the Properties - can be read with STATIC_PARTITION_NUMBER and NUMBER_OF_PARTITIONSDeprecated.Creates and returns an iterator over all the entries that should be loaded into space.voidshutdown()Deprecated.Close the data source and clean any used resources.
Called before space shutdown.
-
Field Details
-
NUMBER_OF_PARTITIONS
Deprecated.use this constant to get from the Properties the number of partitions- See Also:
-
STATIC_PARTITION_NUMBER
Deprecated.use this constant to get from the Properties the partition number- See Also:
-
-
Method Details
-
init
Deprecated.Initialize and configure the data source using given properties.
Called when space is started.
The properties are loaded from a file that can be defined in the space schema or as a property named:
space-config.ExternalDataSource.properties-file partitionId and number of partitions are also in the Properties - can be read with STATIC_PARTITION_NUMBER and NUMBER_OF_PARTITIONS- Parameters:
prop- - contains user defined param and Partition data- Throws:
DataSourceException
-
initialLoad
Deprecated.Creates and returns an iterator over all the entries that should be loaded into space.- Returns:
- a
DataIteratoror null if no data should be loaded into space - Throws:
DataSourceException
-
shutdown
Deprecated.Close the data source and clean any used resources.
Called before space shutdown.- Throws:
DataSourceException
-
SpaceDataSourceorSpaceSynchronizationEndpointinstead.