Interface IngestionProcessRepository

  • All Known Implementing Classes:
    DefaultIngestionProcessRepository

    public interface IngestionProcessRepository
    A repository for basic storage of the ingestion processes.
    • Method Detail

      • createProcess

        String createProcess​(String resourceIngestionDefinitionId,
                             String ingestionConfigurationId,
                             String type,
                             String status,
                             Variant metadata)
        Creates a new ingestion process.
        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        ingestionConfigurationId - ingestion configuration id
        type - process type
        status - initial process status
        metadata - process metadata
        Returns:
        id of the created process
      • updateStatus

        void updateStatus​(String processId,
                          String status)
        Updates the status of an ingestion process with the specified id.
        Parameters:
        processId - process id
        status - new process status
      • updateStatus

        void updateStatus​(String resourceIngestionDefinitionId,
                          String ingestionConfigurationId,
                          String type,
                          String status)
        Updates the status of an ingestion process with the specified resource ingestion definition id, ingestion configuration, and process type.

        This update method is not recommended, as technically multiple processes can fit the specified criteria. It should only be used when the status update is a part of a resource update.

        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        ingestionConfigurationId - ingestion configuration id
        type - process type
        status - new process status
      • endProcess

        void endProcess​(String processId)
        Ends an ingestion process with the specified id.

        The ending of the process will set the status to a terminal value and update the process' finishedAt timestamp.

        Parameters:
        processId - process id
      • endProcess

        void endProcess​(String resourceIngestionDefinitionId,
                        String ingestionConfigurationId,
                        String type)
        Ends an ingestion process with the specified resource ingestion definition id, ingestion configuration, and process type.

        This update method is not recommended, as technically multiple processes can fit the specified criteria. It should only be used when the status update is a part of a resource update.

        The ending of the process will set the status to a terminal value and update the process' finishedAt timestamp.

        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        ingestionConfigurationId - ingestion configuration id
        type - process type
      • fetch

        Optional<IngestionProcess> fetch​(String processId)
        Fetches an ingestion process by the specified id.
        Parameters:
        processId - process id
        Returns:
        ingestion process with the specified id
      • fetchLastFinished

        Optional<IngestionProcess> fetchLastFinished​(String resourceIngestionDefinitionId,
                                                     String ingestionConfigurationId,
                                                     String type)
        Fetches an ingestion process with the latest finishedAt date and status = FINISHED
        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        ingestionConfigurationId - ingestion configuration id
        type - process type
        Returns:
        ingestion process with the specified id
      • fetchAll

        List<IngestionProcess> fetchAll​(String resourceIngestionDefinitionId,
                                        String ingestionConfigurationId,
                                        String type)
        Fetches all ingestion processes with the specified resource ingestion definition id, ingestion configuration, and process type.
        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        ingestionConfigurationId - ingestion configuration id
        type - process type
        Returns:
        a list containing processes matching the specified criteria