Class RunSchedulerIterationHandler
- java.lang.Object
-
- com.snowflake.connectors.application.scheduler.RunSchedulerIterationHandler
-
public class RunSchedulerIterationHandler extends Object
Handler for running a scheduler iteration. A new instance of the handler must be created usingthe builder.
-
-
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 RunSchedulerIterationHandlerBuilderbuilder(Session session)Returns a new instance ofRunSchedulerIterationHandlerBuilder.ConnectorResponserunIteration()Executes the main logic of the handler, with logging usingwithExceptionLogging.static VariantrunIteration(Session session)Default handler method for thePUBLIC.RUN_SCHEDULER_ITERATIONprocedure.
-
-
-
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
-
runIteration
public static Variant runIteration(Session session)
Default handler method for thePUBLIC.RUN_SCHEDULER_ITERATIONprocedure.- Parameters:
session- Snowpark session object- Returns:
- a variant representing the
ConnectorResponsereturned byrunIteration
-
builder
public static RunSchedulerIterationHandlerBuilder builder(Session session)
Returns a new instance ofRunSchedulerIterationHandlerBuilder.- Parameters:
session- Snowpark session object- Returns:
- a new builder instance
-
runIteration
public ConnectorResponse runIteration()
Executes the main logic of the handler, with logging usingwithExceptionLogging.The handler logic consists of running a new scheduler iteration via the
runIterationmethod.- Returns:
- a response with the code
OKif the execution was successful, otherwise a response with an error code and an error message
-
-