Class JythonAsJavaDataSetRegistrationDropboxV2Wrapper

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.apache.log4j.Logger operationLog  
    • 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?
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • operationLog

        protected static final org.apache.log4j.Logger operationLog
    • Constructor Detail

      • JythonAsJavaDataSetRegistrationDropboxV2Wrapper

        public JythonAsJavaDataSetRegistrationDropboxV2Wrapper​(ch.systemsx.cisd.common.jython.IJythonInterpreter interpreter)
    • Method Detail

      • 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 interface IJavaDataSetRegistrationDropboxV2
        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 interface IJavaDataSetRegistrationDropboxV2
        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 interface IJavaDataSetRegistrationDropboxV2
        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 interface IJavaDataSetRegistrationDropboxV2
        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 interface IJavaDataSetRegistrationDropboxV2
        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 interface IJavaDataSetRegistrationDropboxV2
        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.