GigaSpaces XAP 8.0 API

org.openspaces.persistency.patterns
Class AbstractManagedDataSourceSplitter

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

public class AbstractManagedDataSourceSplitter
extends Object
implements ManagedDataSource

A base class for a splitter data source. Accepts a list of ManagedDataSourceEntriesProviders and based on their respective managed entries will split operations to the ones that control a given entry.

Author:
kimchy

Field Summary
protected  ManagedDataSourceEntriesProvider[] dataSources
           
 
Fields inherited from interface com.gigaspaces.datasource.ManagedDataSource
DATA_CLASS_PROPS, NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
 
Constructor Summary
AbstractManagedDataSourceSplitter(ManagedDataSourceEntriesProvider[] dataSources)
           
 
Method Summary
protected  ManagedDataSource getDataSource(String entry)
           
 void init(Properties properties)
          Iterates through all the given data sources and calls ManagedDataSource.init(java.util.Properties) on them.
 DataIterator initialLoad()
          Iterates through all the given data sources and assembles their respective DataIterators from ManagedDataSource.initialLoad().
 void setInitalLoadThreadPoolSize(int initalLoadThreadPoolSize)
           
 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

dataSources

protected final ManagedDataSourceEntriesProvider[] dataSources
Constructor Detail

AbstractManagedDataSourceSplitter

public AbstractManagedDataSourceSplitter(ManagedDataSourceEntriesProvider[] dataSources)
Method Detail

setInitalLoadThreadPoolSize

public void setInitalLoadThreadPoolSize(int initalLoadThreadPoolSize)

init

public void init(Properties properties)
          throws DataSourceException
Iterates through all the given data sources and calls ManagedDataSource.init(java.util.Properties) on them.

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

initialLoad

public DataIterator initialLoad()
                         throws DataSourceException
Iterates through all the given data sources and assembles their respective DataIterators from ManagedDataSource.initialLoad(). Constructs a ConcurrentMultiDataIterator on top of them.

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

getDataSource

protected ManagedDataSource getDataSource(String entry)

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.