Skip to content

Commit 1d58f57

Browse files
SNOW-1880020: Add marker annotation for Snowflake internal API (#2028)
1 parent 0894bb5 commit 1d58f57

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2025 Snowflake Computing Inc. All right reserved.
3+
*/
4+
package net.snowflake.client.core;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
/**
13+
* Elements marked with this annotation should be considered as internal API and are public API only
14+
* for Snowflake internal tools. Starting from version 4.x there will be no guarantees that
15+
* annotated elements will maintain backward compatibility.
16+
*/
17+
@Target({
18+
ElementType.PACKAGE,
19+
ElementType.TYPE,
20+
ElementType.FIELD,
21+
ElementType.CONSTRUCTOR,
22+
ElementType.METHOD
23+
})
24+
@Retention(RetentionPolicy.RUNTIME)
25+
@Documented
26+
public @interface SnowflakeOrgInternalApi {}

src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import net.snowflake.client.core.SFFixedViewResultSet;
5858
import net.snowflake.client.core.SFSession;
5959
import net.snowflake.client.core.SFStatement;
60+
import net.snowflake.client.core.SnowflakeOrgInternalApi;
6061
import net.snowflake.client.jdbc.cloud.storage.SnowflakeStorageClient;
6162
import net.snowflake.client.jdbc.cloud.storage.StageInfo;
6263
import net.snowflake.client.jdbc.cloud.storage.StorageClientFactory;
@@ -2199,6 +2200,7 @@ private static void pushFileToRemoteStore(
21992200
* @param config Configuration to upload a file to cloud storage
22002201
* @throws Exception if error occurs while data upload.
22012202
*/
2203+
@SnowflakeOrgInternalApi
22022204
public static void uploadWithoutConnection(SnowflakeFileTransferConfig config) throws Exception {
22032205
logger.trace("Entering uploadWithoutConnection...");
22042206

src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferConfig.java

+2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
import java.util.Properties;
99
import net.snowflake.client.core.OCSPMode;
1010
import net.snowflake.client.core.SFSession;
11+
import net.snowflake.client.core.SnowflakeOrgInternalApi;
1112

1213
/**
1314
* This class manages the parameters to call SnowflakeFileTransferAgent.uploadWithoutConnection()
1415
*/
16+
@SnowflakeOrgInternalApi
1517
public class SnowflakeFileTransferConfig {
1618
private SnowflakeFileTransferMetadata metadata;
1719
private InputStream uploadStream;

0 commit comments

Comments
 (0)