Class PauseInstanceHandler
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.api.PauseInstanceHandler
-
public class PauseInstanceHandler extends Object
Handler for the Task Reactor instance pausing process. 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 connection configuration failure, used by theConnectorErrorHelper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorResponsepauseInstance(Identifier instanceSchema)Executes the main logic of the handler, with logging usingwithExceptionLogging.static VariantpauseInstance(Session session, String instanceSchema)Default handler method for theTASK_REACTOR.PAUSE_INSTANCEprocedure.
-
-
-
Field Detail
-
ERROR_TYPE
public static final String ERROR_TYPE
Error type for the connection configuration failure, used by theConnectorErrorHelper.- See Also:
- Constant Field Values
-
-
Method Detail
-
pauseInstance
public static Variant pauseInstance(Session session, String instanceSchema)
Default handler method for theTASK_REACTOR.PAUSE_INSTANCEprocedure.It inserts the
PAUSE_INSTANCEcommand into the Task Reactor command queue.- Parameters:
session- Snowpark session objectinstanceSchema- task reactor instance name- Returns:
- a variant representing the
ConnectorResponsereturned bypauseInstance
-
pauseInstance
public ConnectorResponse pauseInstance(Identifier instanceSchema)
Executes the main logic of the handler, with logging usingwithExceptionLogging.- Parameters:
instanceSchema- Task Reactor instance name- Returns:
- a response with the code
OKif the execution was successful, otherwise a response with an error code and an error message
-
-