org.openspaces.persistency.patterns
Class AbstractManagedDataSourceSplitter
java.lang.Object
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 ManagedDataSourceEntriesProvider
s
and based on their respective managed entries will split operations to the ones that control a given entry.
- Author:
- kimchy
Fields inherited from interface com.gigaspaces.datasource.ManagedDataSource |
DATA_CLASS_PROPS, NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER |
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 DataIterator s
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 |
dataSources
protected final ManagedDataSourceEntriesProvider[] dataSources
AbstractManagedDataSourceSplitter
public AbstractManagedDataSourceSplitter(ManagedDataSourceEntriesProvider[] dataSources)
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
DataIterator
s
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)
Copyright © GigaSpaces.