Skip to content

Commit

Permalink
SNOW-1880020: Add marker annotation for Snowflake internal API (#2028)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz authored Jan 14, 2025
1 parent 0894bb5 commit 1d58f57
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2025 Snowflake Computing Inc. All right reserved.
*/
package net.snowflake.client.core;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Elements marked with this annotation should be considered as internal API and are public API only
* for Snowflake internal tools. Starting from version 4.x there will be no guarantees that
* annotated elements will maintain backward compatibility.
*/
@Target({
ElementType.PACKAGE,
ElementType.TYPE,
ElementType.FIELD,
ElementType.CONSTRUCTOR,
ElementType.METHOD
})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface SnowflakeOrgInternalApi {}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import net.snowflake.client.core.SFFixedViewResultSet;
import net.snowflake.client.core.SFSession;
import net.snowflake.client.core.SFStatement;
import net.snowflake.client.core.SnowflakeOrgInternalApi;
import net.snowflake.client.jdbc.cloud.storage.SnowflakeStorageClient;
import net.snowflake.client.jdbc.cloud.storage.StageInfo;
import net.snowflake.client.jdbc.cloud.storage.StorageClientFactory;
Expand Down Expand Up @@ -2199,6 +2200,7 @@ private static void pushFileToRemoteStore(
* @param config Configuration to upload a file to cloud storage
* @throws Exception if error occurs while data upload.
*/
@SnowflakeOrgInternalApi
public static void uploadWithoutConnection(SnowflakeFileTransferConfig config) throws Exception {
logger.trace("Entering uploadWithoutConnection...");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import java.util.Properties;
import net.snowflake.client.core.OCSPMode;
import net.snowflake.client.core.SFSession;
import net.snowflake.client.core.SnowflakeOrgInternalApi;

/**
* This class manages the parameters to call SnowflakeFileTransferAgent.uploadWithoutConnection()
*/
@SnowflakeOrgInternalApi
public class SnowflakeFileTransferConfig {
private SnowflakeFileTransferMetadata metadata;
private InputStream uploadStream;
Expand Down

0 comments on commit 1d58f57

Please sign in to comment.