## Uses of Class
net.snowflake.client.core.SFSession

Packages that use SFSession
net.snowflake.client.core
net.snowflake.client.core.bind
net.snowflake.client.jdbc
net.snowflake.client.jdbc.cloud.storage
net.snowflake.client.jdbc.telemetry

### Uses of SFSession in net.snowflake.client.core

Fields in net.snowflake.client.core declared as SFSession
`protected SFSession` SFBaseResultSet.`session`

Methods in net.snowflake.client.core that return SFSession
`protected SFSession` SFStatement.`getSession()`

Methods in net.snowflake.client.core with parameters of type SFSession
`protected void` HeartbeatBackground.`addSession(SFSession session, long masterTokenValidityInSecs)` Method to add a session It will compare the master token validity and stored master token validity and if it is less, we will update the stored one and the heartbeat interval and reschedule heartbeat.
`static void` IncidentUtil.`generateIncident(SFSession session, String signature, String detail, String requestId, String jobUuid, Throwable cause)`
`static SFException` IncidentUtil.`generateIncidentWithException(SFSession session, String requestId, String jobUuid, ErrorCode errorCode, Object... params)` Creates an SFException without a cause to be thrown and generates/triggers an incident based on that exception.
`static SFException` IncidentUtil.`generateIncidentWithException(SFSession session, String requestId, String jobUuid, Throwable cause, ErrorCode errorCode, Object... params)`
`static SFException` IncidentUtil.`generateIncidentWithSignatureAndException(SFSession session, String requestId, String jobUuid, String signature, ErrorCode errorCode, Object... params)` Creates an SFException without a cause to be thrown and generates/triggers an incident based on that exception with the specified signature.
`static List<SFChildResult>` ResultUtil.`getChildResults(SFSession session, String requestId, com.fasterxml.jackson.databind.JsonNode result)` Return the list of child results provided in a result, if available; otherwise return an empty list
`static Date` ResultUtil.`getDate(String str, TimeZone tz, SFSession session)` Convert a date internal object to a Date object in specified timezone.
`protected static com.fasterxml.jackson.databind.JsonNode` StmtUtil.`getQueryResultJSON(String queryId, SFSession session)` Issue get-result call to get query result given an in progress response.
`static net.snowflake.common.core.SFTime` ResultUtil.`getSFTime(String obj, int scale, SFSession session)` Convert a time internal value (scaled number of seconds + fractional seconds) into an SFTime.
`static net.snowflake.common.core.SFTimestamp` ResultUtil.`getSFTimestamp(String timestampStr, int scale, int internalColumnType, long resultVersion, TimeZone sessionTZ, SFSession session)` Convert a timestamp internal value (scaled number of seconds + fractional seconds) into a SFTimestamp.
`static String` ResultUtil.`getSFTimestampAsString(net.snowflake.common.core.SFTimestamp sfTS, int columnType, int scale, net.snowflake.common.core.SnowflakeDateTimeFormat timestampNTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timestampLTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timestampTZFormatter, SFSession session)` Convert a SFTimestamp to a string value.
`static ResultUtil.ResultOutput` ResultUtil.`processResult(ResultUtil.ResultInput resultData, SFSession sfSession)` A common helper to process result response
`protected void` HeartbeatBackground.`removeSession(SFSession session)` Method to remove a session.
`void` SFBaseResultSet.`setSession(SFSession session)`
`static void` SessionUtil.`updateSfDriverParamValues(Map<String,Object> parameters, SFSession session)`

Constructors in net.snowflake.client.core with parameters of type SFSession
Constructor and Description
`SFResultSetMetaData(int columnCount, List<String> columnNames, List<String> columnTypeNames, List<Integer> columnTypes, SFSession session)`

`SFResultSetMetaData(List<SnowflakeColumnMetadata> columnMetadata, SFSession session, net.snowflake.common.core.SnowflakeDateTimeFormat timestampNTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timestampLTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timestampTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat dateFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timeFormatter)`

`SFResultSetMetaData(List<SnowflakeColumnMetadata> columnMetadata, String queryId, SFSession session, net.snowflake.common.core.SnowflakeDateTimeFormat timestampNTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timestampLTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timestampTZFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat dateFormatter, net.snowflake.common.core.SnowflakeDateTimeFormat timeFormatter)`

`SFStatement(SFSession session)`

### Uses of SFSession in net.snowflake.client.core.bind

Methods in net.snowflake.client.core.bind with parameters of type SFSession
`static BindUploader` BindUploader.`newInstance(SFSession session, String stageDir)` Create a new BindUploader which will upload to the given stage path Ensure temporary directory for file writing exists

### Uses of SFSession in net.snowflake.client.jdbc

Methods in net.snowflake.client.jdbc that return SFSession
`SFSession` SnowflakeConnectionV1.`getSfSession()`

Methods in net.snowflake.client.jdbc with parameters of type SFSession

`static Callable<Void>`

SnowflakeFileTransferAgent.`getDownloadFileCallable(StageInfo stage, String srcFilePath, String localLocation, Map<String,net.snowflake.client.jdbc.SnowflakeFileTransferAgent.FileMetadata> fileMetadataMap, SnowflakeStorageClient client, SFSession connection, String command, int parallel, net.snowflake.common.core.RemoteStoreFileEncryptionMaterial encMat)`
A callable that can be executed in a separate thread using executor service.

`static Callable<Void>`

SnowflakeFileTransferAgent.`getUploadFileCallable(StageInfo stage, String srcFilePath, net.snowflake.client.jdbc.SnowflakeFileTransferAgent.FileMetadata metadata, SnowflakeStorageClient client, SFSession connection, String command, InputStream inputStream, boolean sourceFromStream, int parallel, File srcFile, net.snowflake.common.core.RemoteStoreFileEncryptionMaterial encMat)`
A callable that can be executed in a separate thread using exeuctor service.

`static void` SnowflakeFileTransferAgent.`renewExpiredToken(SFSession connection, String command, SnowflakeStorageClient client)` This static method is called when we are handling an expired token exception It retrieves a fresh token from GS and then calls .renew() on the storage client to refresh itself with the new token

Constructors in net.snowflake.client.jdbc with parameters of type SFSession
Constructor and Description
`SnowflakeFileTransferAgent(String command, SFSession connection, SFStatement statement)`
`SnowflakeResultSetMetaData(int columnCount, List<String> columnNames, List<String> columnTypeNames, List<Integer> columnTypes, SFSession session)`

### Uses of SFSession in net.snowflake.client.jdbc.cloud.storage

Methods in net.snowflake.client.jdbc.cloud.storage with parameters of type SFSession
`void` SnowflakeS3Client.`download(SFSession connection, String command, String localLocation, String destFileName, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion)` Download a file from S3.
`void` SnowflakeStorageClient.`download(SFSession connection, String command, String localLocation, String destFileName, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion)` Download a file from remote storage.
`void` SnowflakeAzureClient.`download(SFSession connection, String command, String localLocation, String destFileName, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion)` Download a file from remote storage.
`InputStream` SnowflakeS3Client.`downloadToStream(SFSession connection, String command, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion)` Download a file from remote storage
`InputStream` SnowflakeStorageClient.`downloadToStream(SFSession connection, String command, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion)` Download a file from remote storage
`InputStream` SnowflakeAzureClient.`downloadToStream(SFSession connection, String command, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion)` Download a file from remote storage
`void` SnowflakeS3Client.`handleStorageException(Exception ex, int retryCount, String operation, SFSession connection, String command)`
`void` SnowflakeStorageClient.`handleStorageException(Exception ex, int retryCount, String operation, SFSession connection, String command)` Handles exceptions thrown by the remote storage provider
`void` SnowflakeAzureClient.`handleStorageException(Exception ex, int retryCount, String operation, SFSession connection, String command)` Handles exceptions thrown by Azure Storage
`void` SnowflakeS3Client.`upload(SFSession connection, String command, int parallelism, boolean uploadFromStream, String remoteStorageLocation, File srcFile, String destFileName, InputStream inputStream, FileBackedOutputStream fileBackedOutputStream, StorageObjectMetadata meta, String stageRegion)` Upload a file (-stream) to S3.
`void` SnowflakeStorageClient.`upload(SFSession connection, String command, int parallelism, boolean uploadFromStream, String remoteStorageLocation, File srcFile, String destFileName, InputStream inputStream, FileBackedOutputStream fileBackedOutputStream, StorageObjectMetadata meta, String stageRegion)` Upload a file (-stream) to remote storage
`void` SnowflakeAzureClient.`upload(SFSession connection, String command, int parallelism, boolean uploadFromStream, String remoteStorageLocation, File srcFile, String destFileName, InputStream inputStream, FileBackedOutputStream fileBackedOutputStream, StorageObjectMetadata meta, String stageRegion)` Upload a file/stream to remote storage

### Uses of SFSession in net.snowflake.client.jdbc.telemetry

Methods in net.snowflake.client.jdbc.telemetry with parameters of type SFSession
`static Telemetry` Telemetry.`createTelemetry(SFSession session)` Initialize the telemetry connector
`static Telemetry` Telemetry.`createTelemetry(SFSession session, int flushSize)` Initialize the telemetry connector