GigaSpaces XAP 9.0 API

org.openspaces.persistency.patterns
Class BulkDataPersisterSplitter

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

public class BulkDataPersisterSplitter
extends AbstractManagedDataSourceSplitter
implements BulkDataPersister

A bulk data persister that implements the execute bulk operation. Reshuffles the given list of bulk items by grouping them based on the types and then calls the executeBulk for each type respective persister.

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
BulkDataPersisterSplitter(ManagedDataSourceEntriesProvider[] dataSources)
           
 
Method Summary
 void executeBulk(List<BulkItem> bulkItems)
          Execute given bulk of operations.
 
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
 

Constructor Detail

BulkDataPersisterSplitter

public BulkDataPersisterSplitter(ManagedDataSourceEntriesProvider[] dataSources)
Method Detail

executeBulk

public void executeBulk(List<BulkItem> bulkItems)
                 throws DataSourceException
Description copied from interface: BulkDataPersister
Execute given bulk of operations.
Each BulkItem contains one of the following operation -

WRITE - given object should be inserted to the data store,
UPDATE - given object should be updated in the data store,
REMOVE - given object should be deleted from the data store

If the implementation uses transactions,
all the bulk operations must be executed in one transaction.

Specified by:
executeBulk in interface BulkDataPersister
Parameters:
bulkItems - list of data object and the operation to apply on that object
Throws:
DataSourceException - when the data store fails to persist the given list of objects

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.