Interface IngestionProcessRepository
-
- All Known Implementing Classes:
DefaultIngestionProcessRepository
public interface IngestionProcessRepository
A repository for basic storage of the ingestion processes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createProcess(String resourceIngestionDefinitionId, String ingestionConfigurationId, String type, String status, Variant metadata)
Creates a new ingestion process.void
endProcess(String processId)
Ends an ingestion process with the specified id.void
endProcess(String resourceIngestionDefinitionId, String ingestionConfigurationId, String type)
Ends an ingestion process with the specified resource ingestion definition id, ingestion configuration, and process type.Optional<IngestionProcess>
fetch(String processId)
Fetches an ingestion process by the specified id.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.List<IngestionProcess>
fetchAllActive(String resourceIngestionDefinitionId)
Fetches all ingestion processes with the specified resource ingestion definition id and statuses:IngestionProcessStatuses.SCHEDULED
,IngestionProcessStatuses.IN_PROGRESS
.Optional<IngestionProcess>
fetchLastFinished(String resourceIngestionDefinitionId, String ingestionConfigurationId, String type)
Fetches an ingestion process with the latest finishedAt date and status = FINISHEDvoid
updateStatus(String processId, String status)
Updates the status of an ingestion process with the specified id.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.
-
-
-
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 idingestionConfigurationId
- ingestion configuration idtype
- process typestatus
-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 idstatus
-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 idingestionConfigurationId
- ingestion configuration idtype
- process typestatus
- 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 idingestionConfigurationId
- ingestion configuration idtype
- 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 idingestionConfigurationId
- ingestion configuration idtype
- 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 idingestionConfigurationId
- ingestion configuration idtype
- process type- Returns:
- a list containing processes matching the specified criteria
-
fetchAllActive
List<IngestionProcess> fetchAllActive(String resourceIngestionDefinitionId)
Fetches all ingestion processes with the specified resource ingestion definition id and statuses:IngestionProcessStatuses.SCHEDULED
,IngestionProcessStatuses.IN_PROGRESS
.- Parameters:
resourceIngestionDefinitionId
- resource ingestion definition id- Returns:
- a list containing processes matching the specified criteria
-
-