Interface SchedulerManager
-
public interface SchedulerManager
Manager ofScheduler
instances.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
alterSchedulerSchedule(String schedule)
Changes scheduler task scheduleConnectorResponse
createScheduler()
Creates a new scheduler instance.static SchedulerManager
getInstance(Session session)
Gets a new instance of the default scheduler manager implementation.ConnectorResponse
pauseScheduler()
Pauses a scheduler task.ConnectorResponse
resumeScheduler()
Resumes a scheduler task.boolean
schedulerExists()
Checks if the scheduler task exists.
-
-
-
Method Detail
-
createScheduler
ConnectorResponse createScheduler()
Creates a new scheduler instance.- Returns:
- a response with the code
OK
if 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
OK
if 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
OK
if 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:
true
if 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_TASK
task - granting of
MONITOR
task privilege to theADMIN
application role - resumption of the task
- Parameters:
session
- Snowpark session object- Returns:
- a new scheduler manager instance
- a default implementation of
-
-