Interface SchedulerManager
-
public interface SchedulerManagerManager ofSchedulerinstances.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidalterSchedulerSchedule(String schedule)Changes scheduler task scheduleConnectorResponsecreateScheduler()Creates a new scheduler instance.static SchedulerManagergetInstance(Session session)Gets a new instance of the default scheduler manager implementation.ConnectorResponsepauseScheduler()Pauses a scheduler task.ConnectorResponseresumeScheduler()Resumes a scheduler task.booleanschedulerExists()Checks if the scheduler task exists.
-
-
-
Method Detail
-
createScheduler
ConnectorResponse createScheduler()
Creates a new scheduler instance.- Returns:
- a response with the code
OKif the creation was successful, otherwise a response with an error code and an error message
-
resumeScheduler
ConnectorResponse resumeScheduler()
Resumes a scheduler task.- Returns:
- a response with the code
OKif the resuming was successful, otherwise a response with an error code and an error message
-
pauseScheduler
ConnectorResponse pauseScheduler()
Pauses a scheduler task.- Returns:
- a response with the code
OKif the pausing was successful, otherwise a response with an error code and an error message
-
schedulerExists
boolean schedulerExists()
Checks if the scheduler task exists.- Returns:
trueif the scheduler task exists, otherwisefalse
-
alterSchedulerSchedule
void alterSchedulerSchedule(String schedule)
Changes scheduler task schedule- Parameters:
schedule- CRON schedule to be changed to.
-
getInstance
static SchedulerManager getInstance(Session session)
Gets a new instance of the default scheduler manager implementation.Default implementation of the scheduler manager uses:
- a default implementation of
ConnectorConfigurationService - a default implementation of
TaskRepository - a default implementation of
TaskLister
The default scheduler creation process consists of:
- creation of
STATE.SCHEDULER_TASKtask - granting of
MONITORtask privilege to theADMINapplication role - resumption of the task
- Parameters:
session- Snowpark session object- Returns:
- a new scheduler manager instance
- a default implementation of
-
-