Class CreateSchedulerHandler
- java.lang.Object
-
- com.snowflake.connectors.application.scheduler.CreateSchedulerHandler
-
public class CreateSchedulerHandler extends Object
Handler for creating a new scheduler.
-
-
Field Summary
Fields Modifier and Type Field Description static StringERROR_TYPEError type for the connector configuration failure, used by theConnectorErrorHelper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CreateSchedulerHandlerBuilderbuilder(Session session)Returns a new instance ofCreateSchedulerHandlerBuilder.ConnectorResponsecreateScheduler()Executes the main logic of the handler, with logging usingwithExceptionLogging.static VariantcreateScheduler(Session session)Default handler method for thePUBLIC.CREATE_SCHEDULERprocedure.
-
-
-
Field Detail
-
ERROR_TYPE
public static final String ERROR_TYPE
Error type for the connector configuration failure, used by theConnectorErrorHelper.- See Also:
- Constant Field Values
-
-
Method Detail
-
createScheduler
public static Variant createScheduler(Session session)
Default handler method for thePUBLIC.CREATE_SCHEDULERprocedure.This method uses:
- a default implementation of
SchedulerManager ConnectorErrorHelperbuilt usingbuildDefault
- Parameters:
session- Snowpark session object- Returns:
- a variant representing the
ConnectorResponsereturned bycreateScheduler
- a default implementation of
-
builder
public static CreateSchedulerHandlerBuilder builder(Session session)
Returns a new instance ofCreateSchedulerHandlerBuilder.- Parameters:
session- Snowpark session object- Returns:
- a new builder instance
-
createScheduler
public ConnectorResponse createScheduler()
Executes the main logic of the handler, with logging usingwithExceptionLogging.The handler logic consists of creating a scheduler via the
createSchedulermethod.- Returns:
- a response with the code
OKif the execution was successful, otherwise a response with an error code and an error message
-
-