GigaSpaces XAP 8.0 API

org.openspaces.persistency.patterns
Class DataProviderSplitter

java.lang.Object
  extended by org.openspaces.persistency.patterns.AbstractManagedDataSourceSplitter
      extended by org.openspaces.persistency.patterns.BulkDataPersisterSplitter
          extended by 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

Field Summary
 
Fields inherited from class org.openspaces.persistency.patterns.AbstractManagedDataSourceSplitter
dataSources
 
Fields inherited from interface com.gigaspaces.datasource.ManagedDataSource
DATA_CLASS_PROPS, NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
 
Constructor Summary
DataProviderSplitter(ManagedDataSourceEntriesProvider[] dataSources)
           
 
Method Summary
 DataIterator iterator(Object o)
          Create an iterator over all objects that match the given template.
 Object read(Object o)
          Read one object that matches the given template.
 
Methods inherited from class org.openspaces.persistency.patterns.BulkDataPersisterSplitter
executeBulk
 
Methods inherited from class org.openspaces.persistency.patterns.AbstractManagedDataSourceSplitter
getDataSource, init, initialLoad, setInitalLoadThreadPoolSize, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.gigaspaces.datasource.ManagedDataSource
init, initialLoad, shutdown
 

Constructor Detail

DataProviderSplitter

public DataProviderSplitter(ManagedDataSourceEntriesProvider[] dataSources)
Method Detail

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

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.