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 Object implements IJavaDataSetRegistrationDropboxV2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.apache.log4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JythonAsJavaDataSetRegistrationDropboxV2Wrapper(ch.systemsx.cisd.common.jython.IJythonInterpreter interpreter)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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
    Invoked when new data is found in the incoming folder.
    void
    rollbackPreRegistration(ch.systemsx.cisd.etlserver.registrator.DataSetRegistrationContext context, 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, 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 Details

    • operationLog

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

    • JythonAsJavaDataSetRegistrationDropboxV2Wrapper

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

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