Package net.snowflake.ingest.streaming
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 moreSnowflakeStreamingIngestChannelThread safety note: Implementations of this interface are required to be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,String>getLatestCommittedOffsetTokens(List<SnowflakeStreamingIngestChannel> channels)Return the latest committed offset token for a list of channelsStringgetName()Get the client namebooleanisClosed()Check whether the client is closed or not, if you want to make sure all data are committed before closing, please callAutoCloseable.close()before closing the entire clientSnowflakeStreamingIngestChannelopenChannel(OpenChannelRequest request)Open a channel against a Snowflake table using aOpenChannelRequestvoidsetRefreshToken(String refreshToken)Set refresh token, this method is for refresh token renewal without requiring to restart client.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
openChannel
SnowflakeStreamingIngestChannel openChannel(OpenChannelRequest request)
Open a channel against a Snowflake table using aOpenChannelRequest- Parameters:
request- the open channel request- Returns:
- a
SnowflakeStreamingIngestChannelobject
-
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 callAutoCloseable.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
-
-