Package org.apache.flink.table.workflow
Interface WorkflowScheduler<T extends RefreshHandler>
-
- Type Parameters:
T- The type ofRefreshHandlerused by specificWorkflowSchedulerto locate the refresh workflow in scheduler service.
@PublicEvolving public interface WorkflowScheduler<T extends RefreshHandler>This interface is used to interact with specific workflow scheduler services that support creating, modifying, and deleting refreshed workflow of Materialized Table.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this workflow scheduler when it is no longer needed and release any resource that it might be holding.TcreateRefreshWorkflow(CreateRefreshWorkflow createRefreshWorkflow)Create a refresh workflow in specific scheduler service for the materialized table, return aRefreshHandlerinstance which can locate the refresh workflow detail information.voiddeleteRefreshWorkflow(DeleteRefreshWorkflow<T> deleteRefreshWorkflow)Delete the refresh workflow in scheduler service.RefreshHandlerSerializer<T>getRefreshHandlerSerializer()Return aRefreshHandlerSerializerinstance to serialize and deserializeRefreshHandlercreated by specific workflow scheduler service.voidmodifyRefreshWorkflow(ModifyRefreshWorkflow<T> modifyRefreshWorkflow)Modify the refresh workflow status in scheduler service.voidopen()Open this workflow scheduler instance.
-
-
-
Method Detail
-
open
void open() throws WorkflowException
Open this workflow scheduler instance. Used for any required preparation in initialization phase.- Throws:
WorkflowException- if initializing workflow scheduler occur exception
-
close
void close() throws WorkflowExceptionClose this workflow scheduler when it is no longer needed and release any resource that it might be holding.- Throws:
WorkflowException- if closing the related resources of workflow scheduler failed
-
getRefreshHandlerSerializer
RefreshHandlerSerializer<T> getRefreshHandlerSerializer()
Return aRefreshHandlerSerializerinstance to serialize and deserializeRefreshHandlercreated by specific workflow scheduler service.
-
createRefreshWorkflow
T createRefreshWorkflow(CreateRefreshWorkflow createRefreshWorkflow) throws WorkflowException
Create a refresh workflow in specific scheduler service for the materialized table, return aRefreshHandlerinstance which can locate the refresh workflow detail information.This method supports creating workflow for periodic refresh, as well as workflow for a one-time refresh only.
- Parameters:
createRefreshWorkflow- The detail info for create refresh workflow of materialized table.- Returns:
- The meta info which points to the refresh workflow in scheduler service.
- Throws:
WorkflowException- if creating refresh workflow failed
-
modifyRefreshWorkflow
void modifyRefreshWorkflow(ModifyRefreshWorkflow<T> modifyRefreshWorkflow) throws WorkflowException
Modify the refresh workflow status in scheduler service. This includes suspend, resume, modify schedule cron operation, and so on.- Parameters:
modifyRefreshWorkflow- The detail info for modify refresh workflow of materialized table.- Throws:
WorkflowException- if modify refresh workflow failed
-
deleteRefreshWorkflow
void deleteRefreshWorkflow(DeleteRefreshWorkflow<T> deleteRefreshWorkflow) throws WorkflowException
Delete the refresh workflow in scheduler service.- Parameters:
deleteRefreshWorkflow- The detail info for delete refresh workflow of materialized table.- Throws:
WorkflowException- if delete refresh workflow failed
-
-