org.openspaces.persistency.patterns
Class DataProviderSplitter
java.lang.Object
org.openspaces.persistency.patterns.AbstractManagedDataSourceSplitter
org.openspaces.persistency.patterns.BulkDataPersisterSplitter
org.openspaces.persistency.patterns.DataProviderSplitter
- All Implemented Interfaces:
- BulkDataPersister, DataProvider, ManagedDataSource
public class DataProviderSplitter
- extends BulkDataPersisterSplitter
- implements DataProvider
A data provider that redirects template based operations to the given data source that can
handle its type.
- Author:
- kimchy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataProviderSplitter
public DataProviderSplitter(ManagedDataSourceEntriesProvider[] dataSources)
read
public Object read(Object o)
throws DataSourceException
- Description copied from interface:
DataProvider
- Read one object that matches the given template.
Used by the space for read templates with UID.
- Specified by:
read
in interface DataProvider
- Returns:
- matched object or null
- Throws:
DataSourceException
iterator
public DataIterator iterator(Object o)
throws DataSourceException
- Description copied from interface:
DataProvider
- Create an iterator over all objects that match the given template.
Note: null value can be passed - in case of a null template or at initial space load.
If SQLDataProvider
interface is also implemented - the space will use SQLDataProvider
.iterator instead.
- Specified by:
iterator
in interface DataProvider
- Returns:
- a
DataIterator
or null if no data was found that match the given template
- Throws:
DataSourceException
Copyright © GigaSpaces.