GigaSpaces - Open Spaces

org.openspaces.persistency.patterns
Class AbstractManagedDataSourceSplitter

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

public class AbstractManagedDataSourceSplitter
extends Object
implements com.gigaspaces.datasource.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  com.gigaspaces.datasource.ManagedDataSource getDataSource(String entry)
           
 void init(Properties properties)
          Iterates through all the given data sources and calls ManagedDataSource.init(java.util.Properties) on them.
 com.gigaspaces.datasource.DataIterator initialLoad()
          Iterates through all the given data sources and assembles their respective DataIterators from ManagedDataSource.initialLoad().
 void setInitalLoadThreadPoolSize(int initalLoadThreadPoolSize)
           
 void shutdown()
           
 
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 com.gigaspaces.datasource.DataSourceException
Iterates through all the given data sources and calls ManagedDataSource.init(java.util.Properties) on them.

Specified by:
init in interface com.gigaspaces.datasource.ManagedDataSource
Throws:
com.gigaspaces.datasource.DataSourceException

initialLoad

public com.gigaspaces.datasource.DataIterator initialLoad()
                                                   throws com.gigaspaces.datasource.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 com.gigaspaces.datasource.ManagedDataSource
Throws:
com.gigaspaces.datasource.DataSourceException

shutdown

public void shutdown()
              throws com.gigaspaces.datasource.DataSourceException
Specified by:
shutdown in interface com.gigaspaces.datasource.ManagedDataSource
Throws:
com.gigaspaces.datasource.DataSourceException

getDataSource

protected com.gigaspaces.datasource.ManagedDataSource getDataSource(String entry)

GigaSpaces - Open Spaces

Copyright © GigaSpaces.