GigaSpaces XAP 7.0 API

org.openspaces.persistency.patterns
Class AbstractManagedDataSourceDelegator

java.lang.Object
  extended by org.openspaces.persistency.patterns.AbstractManagedDataSourceDelegator
All Implemented Interfaces:
ManagedDataSource
Direct Known Subclasses:
BulkDataPersisterExceptionHandler

public abstract class AbstractManagedDataSourceDelegator
extends Object
implements ManagedDataSource

Base class that delegates execution to data source.

Author:
kimchy

Field Summary
protected  ManagedDataSource dataSource
           
 
Fields inherited from interface com.gigaspaces.datasource.ManagedDataSource
DATA_CLASS_PROPS, NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
 
Constructor Summary
AbstractManagedDataSourceDelegator(ManagedDataSource dataSource)
           
 
Method Summary
 void init(Properties properties)
          Initialize and configure the data source using given properties.
 DataIterator initialLoad()
           Creates and returns an iterator over all the entries that should be loaded into space.
 void shutdown()
          Close the data source and clean any used resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected final ManagedDataSource dataSource
Constructor Detail

AbstractManagedDataSourceDelegator

public AbstractManagedDataSourceDelegator(ManagedDataSource dataSource)
Method Detail

init

public void init(Properties properties)
          throws DataSourceException
Description copied from interface: ManagedDataSource
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

Specified by:
init in interface ManagedDataSource
Parameters:
properties - - contains user defined param and Partition data
Throws:
DataSourceException

initialLoad

public DataIterator initialLoad()
                         throws DataSourceException
Description copied from interface: ManagedDataSource
Creates and returns an iterator over all the entries that should be loaded into space.

Specified by:
initialLoad in interface ManagedDataSource
Returns:
a DataIterator or null if no data should be loaded into space
Throws:
DataSourceException

shutdown

public void shutdown()
              throws DataSourceException
Description copied from interface: ManagedDataSource
Close the data source and clean any used resources.
Called before space shutdown.

Specified by:
shutdown in interface ManagedDataSource
Throws:
DataSourceException

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.