Class StatementHandle

java.lang.Object
io.confluent.flink.plugin.StatementHandle

public class StatementHandle extends Object
A handle to manage a Flink SQL statement on Confluent Cloud.

This handle provides methods to:

  • Stop the statement execution
  • Resume the statement execution
  • Delete the statement
  • Retrieve warnings
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes the statement, blocking until the deletion completes or the configured timeout (client.timeout) elapses.
    void
    delete(boolean await)
    Deletes the statement, optionally waiting for the deletion to complete before returning.
    boolean
     
    fromName(TableEnvironment env, String statementName)
    Creates a handle to an existing Flink SQL statement on Confluent Cloud.
    Creates a handle to an existing Flink SQL statement on Confluent Cloud.
    Returns the name of the statement.
    io.confluent.flink.plugin.model.SqlV1Statement
    Returns the raw, underlying OpenAPI SqlV1Statement response for this statement.
    Returns the warnings associated with this statement.
    int
     
    void
    Resumes the statement execution from a previously stopped statement, blocking until the statement resumes or the configured timeout (client.timeout) elapses.
    void
    resume(boolean await)
    Resumes the statement execution from a previously stopped statement, optionally waiting for the statement to resume before returning.
    void
    Stops the statement execution, blocking until the statement reaches a stopped state or the configured timeout (client.timeout) elapses.
    void
    stop(boolean await)
    Stops the statement execution, optionally waiting for the statement to reach a stopped state before returning.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • fromName

      public static StatementHandle fromName(TableEnvironment env, String statementName)
      Creates a handle to an existing Flink SQL statement on Confluent Cloud.

      Note: Whether a statement exists under the given name is checked lazily when invoking one of the provided handling methods.

    • fromTableResult

      public static StatementHandle fromTableResult(TableResult tableResult)
      Creates a handle to an existing Flink SQL statement on Confluent Cloud.

      Note: Whether a statement exists under the given name is checked lazily when invoking one of the provided handling methods.

    • getName

      public String getName()
      Returns the name of the statement.
    • stop

      public void stop()
      Stops the statement execution, blocking until the statement reaches a stopped state or the configured timeout (client.timeout) elapses.
    • stop

      public void stop(boolean await)
      Stops the statement execution, optionally waiting for the statement to reach a stopped state before returning.
    • resume

      public void resume()
      Resumes the statement execution from a previously stopped statement, blocking until the statement resumes or the configured timeout (client.timeout) elapses.
    • resume

      public void resume(boolean await)
      Resumes the statement execution from a previously stopped statement, optionally waiting for the statement to resume before returning.
    • delete

      public void delete()
      Deletes the statement, blocking until the deletion completes or the configured timeout (client.timeout) elapses.
    • delete

      public void delete(boolean await)
      Deletes the statement, optionally waiting for the deletion to complete before returning.
    • getWarnings

      public List<StatementWarning> getWarnings()
      Returns the warnings associated with this statement.
    • getSqlV1Statement

      public io.confluent.flink.plugin.model.SqlV1Statement getSqlV1Statement()
      Returns the raw, underlying OpenAPI SqlV1Statement response for this statement. This can be useful to access more detailed information about statement execution.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object