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 String
ERROR_TYPE
Error 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 RunSchedulerIterationHandlerBuilder
builder(Session session)
Returns a new instance ofRunSchedulerIterationHandlerBuilder
.ConnectorResponse
runIteration()
Executes the main logic of the handler, with logging usingwithExceptionLogging
.static Variant
runIteration(Session session)
Default handler method for thePUBLIC.RUN_SCHEDULER_ITERATION
procedure.
-
-
-
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_ITERATION
procedure.- Parameters:
session
- Snowpark session object- Returns:
- a variant representing the
ConnectorResponse
returned 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
runIteration
method.- Returns:
- a response with the code
OK
if the execution was successful, otherwise a response with an error code and an error message
-
-