GigaSpaces XAP 10.0.1 API

com.gigaspaces.datasource
Interface ManagedDataSource<T>

All Known Subinterfaces:
DataPersister<T>, DataProvider<T>, ExternalDataSource<T>, ManagedDataSourceEntriesProvider, SQLDataProvider<T>
All Known Implementing Classes:
AbstractHibernateExternalDataSource, AbstractManagedDataSourceDelegator, AbstractManagedDataSourceSplitter, BulkDataPersisterExceptionHandler, BulkDataPersisterSplitter, CriteriaHibernateExternalDataSource, DataProviderSplitter, DefaultHibernateExternalDataSource, SQLDataProviderExceptionHandler, SQLDataProviderSplitter, StatelessHibernateExternalDataSource

Deprecated. since 9.5 - use SpaceDataSource or SpaceSynchronizationEndpoint instead.

@Deprecated
public interface ManagedDataSource<T>

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

Since:
6.0
Author:
anna
See Also:
DataProvider, DataPersister

Field Summary
static String NUMBER_OF_PARTITIONS
          Deprecated. use this constant to get from the Properties the number of partitions
static String STATIC_PARTITION_NUMBER
          Deprecated. use this constant to get from the Properties the partition number
 
Method Summary
 void init(Properties prop)
          Deprecated. Initialize and configure the data source using given properties.
 DataIterator<T> initialLoad()
          Deprecated.  Creates and returns an iterator over all the entries that should be loaded into space.
 void shutdown()
          Deprecated. Close the data source and clean any used resources.
 

Field Detail

NUMBER_OF_PARTITIONS

static final String NUMBER_OF_PARTITIONS
Deprecated. 
use this constant to get from the Properties the number of partitions

See Also:
Constant Field Values

STATIC_PARTITION_NUMBER

static final String STATIC_PARTITION_NUMBER
Deprecated. 
use this constant to get from the Properties the partition number

See Also:
Constant Field Values
Method Detail

init

void init(Properties prop)
          throws DataSourceException
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

DataIterator<T> initialLoad()
                            throws DataSourceException
Deprecated. 
Creates and returns an iterator over all the entries that should be loaded into space.

Returns:
a DataIterator or null if no data should be loaded into space
Throws:
DataSourceException

shutdown

void shutdown()
              throws DataSourceException
Deprecated. 
Close the data source and clean any used resources.
Called before space shutdown.

Throws:
DataSourceException

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.