Interface SnowflakeStreamingIngestClient

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    SnowflakeStreamingIngestClientInternal

    public interface SnowflakeStreamingIngestClient
    extends AutoCloseable
    A class that is the starting point for using the Streaming Ingest client APIs, a single client maps to exactly one account in Snowflake; however, multiple clients can point to the same account. Each client will contain information for Snowflake authentication and authorization, and it will be used to create one or more SnowflakeStreamingIngestChannel

    Thread safety note: Implementations of this interface are required to be thread safe.

    • Method Detail

      • getName

        String getName()
        Get the client name
        Returns:
        the client name
      • setRefreshToken

        void setRefreshToken​(String refreshToken)
        Set refresh token, this method is for refresh token renewal without requiring to restart client. This method only works when the authorization type is OAuth.
        Parameters:
        refreshToken - the new refresh token
      • isClosed

        boolean isClosed()
        Check whether the client is closed or not, if you want to make sure all data are committed before closing, please call AutoCloseable.close() before closing the entire client
        Returns:
        a boolean to indicate whether the client is closed
      • getLatestCommittedOffsetTokens

        Map<String,​String> getLatestCommittedOffsetTokens​(List<SnowflakeStreamingIngestChannel> channels)
        Return the latest committed offset token for a list of channels
        Returns:
        a map of channel fully qualified name to latest committed offset token