package com.lanyuanxiaoyao.service.forest.service;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.lanyuanxiaoyao.service.configuration.entity.schedule.ScheduleStrategy;
import org.eclipse.collections.api.list.ImmutableList;

/**
 * @author lanyuanxiaoyao
 * @date 2023-06-27
 */
@BaseRequest(baseURL = "http://service-scheduler/schedule")
public interface ScheduleService {
    @Get("/schedule_jobs")
    ImmutableList<ScheduleStrategy> scheduleJobs();

    @Get("/schedule_times")
    ImmutableList<Long> scheduleJobTimes();

    @Get("/all")
    void scheduleAllTable();

    @Get("/all_focus")
    void scheduleAllFocus();

    @Get("/all_un_scheduled")
    void scheduleAllUnScheduledTable();

    @Get("/table")
    void scheduleTable(@Query("flink_job_id") Long flinkJobId, @Query("alias") String alias);

    @Get("/table")
    void scheduleTableForce(@Query("flink_job_id") Long flinkJobId, @Query("alias") String alias, @Query("force") String forceCluster);

    @Get("/table")
    void scheduleTableRecommend(@Query("flink_job_id") Long flinkJobId, @Query("alias") String alias, @Query("recommend") String recommendCluster);

    @Get("/stop_all")
    void stopAll(@Query("flink_job_id") Long flinkJobId, @Query("alias") String alias, @Query("disable_meta") Boolean disableMeta);
}
