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.LoggeroperationLog
-
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 booleanisRetryFunctionDefined()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.voidpostMetadataRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)Invoked just after the metadata is registered with the openBIS AS.voidpostStorage(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.voidpreMetadataRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context)Invoked just before the metadata is registered with the openBIS AS.voidprocess(IDataSetRegistrationTransactionV2 transaction)Invoked when new data is found in the incoming folder.voidrollbackPreRegistration(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.booleanshouldRetryProcessing(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:IJavaDataSetRegistrationDropboxV2Invoked when new data is found in the incoming folder. Implements the logic of registering and modifying entities.- Specified by:
processin 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:IJavaDataSetRegistrationDropboxV2Invoked 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:
postStoragein 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:IJavaDataSetRegistrationDropboxV2Invoked 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:
preMetadataRegistrationin 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:IJavaDataSetRegistrationDropboxV2Invoked 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:
postMetadataRegistrationin 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:IJavaDataSetRegistrationDropboxV2Invoked if the transaction is rolledback before the metadata is registered with the openBIS AS.- Specified by:
rollbackPreRegistrationin 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:IJavaDataSetRegistrationDropboxV2Is 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:
isRetryFunctionDefinedin 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:IJavaDataSetRegistrationDropboxV2Given the problem with registration, should it be retried?- Specified by:
shouldRetryProcessingin 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.
-
-