Class JythonAsJavaDataSetRegistrationDropboxV2Wrapper
- java.lang.Object
-
- ch.systemsx.cisd.etlserver.registrator.api.v2.JythonAsJavaDataSetRegistrationDropboxV2Wrapper
-
- All Implemented Interfaces:
ch.ethz.cisd.hotdeploy.Plugin
,IJavaDataSetRegistrationDropboxV2
public class JythonAsJavaDataSetRegistrationDropboxV2Wrapper extends java.lang.Object implements IJavaDataSetRegistrationDropboxV2
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.log4j.Logger
operationLog
-
Constructor Summary
Constructors Constructor Description JythonAsJavaDataSetRegistrationDropboxV2Wrapper(ch.systemsx.cisd.common.jython.IJythonInterpreter interpreter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRetryFunctionDefined()
Is a function defined that can be used to check if a failed registration should be retried? Primarily for use implementations of this interface that dispatch to dynamic languages.void
postMetadataRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)
Invoked just after the metadata is registered with the openBIS AS.void
postStorage(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)
Invoked after the data has been stored in its final location on the file system and the storage has been confirmed with the AS.void
preMetadataRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)
Invoked just before the metadata is registered with the openBIS AS.void
process(IDataSetRegistrationTransactionV2 transaction)
Invoked when new data is found in the incoming folder.void
rollbackPreRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context, java.lang.Throwable throwable)
Invoked if the transaction is rolledback before the metadata is registered with the openBIS AS.boolean
shouldRetryProcessing(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context, java.lang.Exception problem)
Given the problem with registration, should it be retried?
-
-
-
Method Detail
-
process
public void process(IDataSetRegistrationTransactionV2 transaction)
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Invoked when new data is found in the incoming folder. Implements the logic of registering and modifying entities.- Specified by:
process
in interfaceIJavaDataSetRegistrationDropboxV2
- Parameters:
transaction
- The transaction that offers methods for registering and modifying entities and performing operations on the file system.
-
postStorage
public void postStorage(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Invoked after the data has been stored in its final location on the file system and the storage has been confirmed with the AS.- Specified by:
postStorage
in interfaceIJavaDataSetRegistrationDropboxV2
- Parameters:
context
- Context of the registration. Offers access to the global state and persistent map.
-
preMetadataRegistration
public void preMetadataRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Invoked just before the metadata is registered with the openBIS AS. Gives dropbox implementations an opportunity to perform additional operations. If an exception is thrown in this method, the transaction is rolledback.- Specified by:
preMetadataRegistration
in interfaceIJavaDataSetRegistrationDropboxV2
- Parameters:
context
- Context of the registration. Offers access to the global state and persistent map.
-
postMetadataRegistration
public void postMetadataRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Invoked just after the metadata is registered with the openBIS AS. Gives dropbox implementations an opportunity to perform additional operations. If an exception is thrown in this method, it is logged but otherwise ignored.- Specified by:
postMetadataRegistration
in interfaceIJavaDataSetRegistrationDropboxV2
- Parameters:
context
- Context of the registration. Offers access to the global state and persistent map.
-
rollbackPreRegistration
public void rollbackPreRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context, java.lang.Throwable throwable)
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Invoked if the transaction is rolledback before the metadata is registered with the openBIS AS.- Specified by:
rollbackPreRegistration
in interfaceIJavaDataSetRegistrationDropboxV2
- Parameters:
context
- Context of the registration. Offers access to the global state and persistent map.throwable
- The throwable that triggered rollback.
-
isRetryFunctionDefined
public boolean isRetryFunctionDefined()
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Is a function defined that can be used to check if a failed registration should be retried? Primarily for use implementations of this interface that dispatch to dynamic languages.- Specified by:
isRetryFunctionDefined
in interfaceIJavaDataSetRegistrationDropboxV2
- Returns:
- true shouldRetryProcessing is defined, false otherwise.
-
shouldRetryProcessing
public boolean shouldRetryProcessing(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context, java.lang.Exception problem)
Description copied from interface:IJavaDataSetRegistrationDropboxV2
Given the problem with registration, should it be retried?- Specified by:
shouldRetryProcessing
in interfaceIJavaDataSetRegistrationDropboxV2
- Parameters:
context
- Context of the registration. Offers access to the global state and persistent map.problem
- The exception that caused the registration to fail.- Returns:
- true if the registration should be retried.
-
-