fr.fastconnect.gigaspaces.datasource.strategy
Class SpaceStorageExecutionFailureStrategy

java.lang.Object
  extended by fr.fastconnect.gigaspaces.datasource.strategy.SpaceStorageExecutionFailureStrategy
All Implemented Interfaces:
ExecutionFailureStrategy

public class SpaceStorageExecutionFailureStrategy
extends java.lang.Object
implements ExecutionFailureStrategy

Use a space to store data.
Space is defined by a URL configured through SPACE_STORAGE_EXECUTION_EXCEPTION_STRATEGY_URL_PROPERTY. If undefined then init(Properties) will throw a DataSourceException.
If underlying SpaceFinder.find(String) throws an exception then init(Properties) will throw a DataSourceException.


Field Summary
static java.lang.String SPACE_STORAGE_EXECUTION_EXCEPTION_STRATEGY_URL_PROPERTY
           
 
Constructor Summary
SpaceStorageExecutionFailureStrategy()
           
SpaceStorageExecutionFailureStrategy(com.j_spaces.core.IJSpace proxy)
           
 
Method Summary
 void handleExecutionFailure(com.gigaspaces.datasource.BulkDataPersister bulkDataPersister, java.util.List<com.gigaspaces.datasource.BulkItem> bulkItems, com.gigaspaces.datasource.DataSourceException exception)
          Deals with the DataException thrown by a BulkDataPersister.executeBulk(List).
 void init(java.util.Properties properties)
          Allows the ExecutionFailureStrategy to be configured using the Properties object from com.gigaspaces.datasource.ManagedDataSource.ManagedDataSource#init(Properties).
 void setSpace(com.j_spaces.core.IJSpace space)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPACE_STORAGE_EXECUTION_EXCEPTION_STRATEGY_URL_PROPERTY

public static final java.lang.String SPACE_STORAGE_EXECUTION_EXCEPTION_STRATEGY_URL_PROPERTY
See Also:
Constant Field Values
Constructor Detail

SpaceStorageExecutionFailureStrategy

public SpaceStorageExecutionFailureStrategy()

SpaceStorageExecutionFailureStrategy

public SpaceStorageExecutionFailureStrategy(com.j_spaces.core.IJSpace proxy)
Method Detail

init

public void init(java.util.Properties properties)
          throws com.gigaspaces.datasource.DataSourceException
Allows the ExecutionFailureStrategy to be configured using the Properties object from com.gigaspaces.datasource.ManagedDataSource.ManagedDataSource#init(Properties).

Specified by:
init in interface ExecutionFailureStrategy
Parameters:
properties - the Properties received by com.gigaspaces.datasource.ManagedDataSource.ManagedDataSource#init(Properties)
Throws:
com.gigaspaces.datasource.DataSourceException - if thrown is propagated to com.gigaspaces.datasource.ManagedDataSource.ManagedDataSource#init(Properties)

handleExecutionFailure

public void handleExecutionFailure(com.gigaspaces.datasource.BulkDataPersister bulkDataPersister,
                                   java.util.List<com.gigaspaces.datasource.BulkItem> bulkItems,
                                   com.gigaspaces.datasource.DataSourceException exception)
                            throws java.lang.Exception
Description copied from interface: ExecutionFailureStrategy
Deals with the DataException thrown by a BulkDataPersister.executeBulk(List).
If this method itself throws an exception then we delegate the call to CompositeBulkDataPersister#handleUnrecuperableException(BulkDataPersister, List).

Specified by:
handleExecutionFailure in interface ExecutionFailureStrategy
Parameters:
bulkDataPersister - the persister used
bulkItems - the information received
exception - the Exception thrown by the BulkDataPersister.executeBulk(List) execution.
Throws:
java.lang.Exception - delegates failure to CompositeBulkDataPersister#handleUnrecuperableException(BulkDataPersister, List)

setSpace

public void setSpace(com.j_spaces.core.IJSpace space)


Copyright © 2007-2009 FastConnect. All Rights Reserved.