net.snowflake.client.core

## Class SessionUtil

- java.lang.Object
- - net.snowflake.client.core.SessionUtil

    public class SessionUtil
    extends Object

Low level session util

### Field Summary

Fields
`static String` `CLIENT_CONSERVATIVE_MEMORY_ADJUST_STEP`
`static String` `CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE`
`static String` `CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE_JVM`
`static String` `CLIENT_ENABLE_LOG_INFO_STATEMENT_PARAMETERS`
`static String` `CLIENT_MEMORY_LIMIT`
`static String` `CLIENT_MEMORY_LIMIT_JVM`
`static String` `CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX`
`static String` `CLIENT_METADATA_USE_SESSION_DATABASE`
`static String` `CLIENT_PREFETCH_THREADS`
`static String` `CLIENT_PREFETCH_THREADS_JVM`
`static String` `CLIENT_RESULT_CHUNK_SIZE`
`static String` `CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY`
`static String` `CLIENT_SFSQL`
`static String` `CLIENT_VALIDATE_DEFAULT_PARAMETERS`
`static long` `DEFAULT_CLIENT_MEMORY_LIMIT`
`static int` `DEFAULT_CLIENT_PREFETCH_THREADS`
`static String` `ENABLE_STAGE_S3_PRIVATELINK_FOR_US_EAST_1`
`static Map<String,String>` `JVM_PARAMS_TO_PARAMS`
`static int` `MAX_CLIENT_CHUNK_SIZE`
`static int` `MIN_CLIENT_CHUNK_SIZE`
`static String` `OCSP_FAIL_OPEN_JVM`
`static String` `SF_HEADER_AUTHORIZATION`
`protected static String` `SF_PATH_AUTHENTICATOR_REQUEST`
`static String` `SF_QUERY_SESSION_DELETE`

### Constructor Summary

Constructors
Constructor and Description
`SessionUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `deleteIdTokenCache(String host, String user)` Delete the id token cache
`static void` `deleteMfaTokenCache(String host, String user)`
`static Map<String,Object>` `getCommonParams(com.fasterxml.jackson.databind.JsonNode paramsNode)` Helper function to parse a JsonNode from a GS response containing CommonParameters, emitting an EnumMap of parameters
`static void` `resetOCSPUrlIfNecessary(String serverUrl)` Reset OCSP cache server if the snowflake server URL is for private link.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SF_PATH_AUTHENTICATOR_REQUEST

    protected static final String SF_PATH_AUTHENTICATOR_REQUEST

See Also:
  Constant Field Values

#### SF_QUERY_SESSION_DELETE

    public static final String SF_QUERY_SESSION_DELETE

See Also:
  Constant Field Values

#### SF_HEADER_AUTHORIZATION

    public static final String SF_HEADER_AUTHORIZATION

See Also:
  Constant Field Values

#### CLIENT_RESULT_CHUNK_SIZE

    public static final String CLIENT_RESULT_CHUNK_SIZE

See Also:
  Constant Field Values

#### CLIENT_MEMORY_LIMIT_JVM

    public static final String CLIENT_MEMORY_LIMIT_JVM

See Also:
  Constant Field Values

#### CLIENT_MEMORY_LIMIT

    public static final String CLIENT_MEMORY_LIMIT

See Also:
  Constant Field Values

#### CLIENT_PREFETCH_THREADS_JVM

    public static final String CLIENT_PREFETCH_THREADS_JVM

See Also:
  Constant Field Values

#### CLIENT_PREFETCH_THREADS

    public static final String CLIENT_PREFETCH_THREADS

See Also:
  Constant Field Values

#### CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE_JVM

    public static final String CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE_JVM

See Also:
  Constant Field Values

#### CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE

    public static final String CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE

See Also:
  Constant Field Values

#### CLIENT_CONSERVATIVE_MEMORY_ADJUST_STEP

    public static final String CLIENT_CONSERVATIVE_MEMORY_ADJUST_STEP

See Also:
  Constant Field Values

#### OCSP_FAIL_OPEN_JVM

    public static final String OCSP_FAIL_OPEN_JVM

See Also:
  Constant Field Values

#### CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY

    public static final String CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY

See Also:
  Constant Field Values

#### CLIENT_SFSQL

    public static final String CLIENT_SFSQL

See Also:
  Constant Field Values

#### CLIENT_VALIDATE_DEFAULT_PARAMETERS

    public static final String CLIENT_VALIDATE_DEFAULT_PARAMETERS

See Also:
  Constant Field Values

#### CLIENT_ENABLE_LOG_INFO_STATEMENT_PARAMETERS

    public static final String CLIENT_ENABLE_LOG_INFO_STATEMENT_PARAMETERS

See Also:
  Constant Field Values

#### CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX

    public static final String CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX

See Also:
  Constant Field Values

#### CLIENT_METADATA_USE_SESSION_DATABASE

    public static final String CLIENT_METADATA_USE_SESSION_DATABASE

See Also:
  Constant Field Values

#### ENABLE_STAGE_S3_PRIVATELINK_FOR_US_EAST_1

    public static final String ENABLE_STAGE_S3_PRIVATELINK_FOR_US_EAST_1

See Also:
  Constant Field Values

#### DEFAULT_CLIENT_MEMORY_LIMIT

    public static long DEFAULT_CLIENT_MEMORY_LIMIT

#### DEFAULT_CLIENT_PREFETCH_THREADS

    public static int DEFAULT_CLIENT_PREFETCH_THREADS

#### MIN_CLIENT_CHUNK_SIZE

    public static int MIN_CLIENT_CHUNK_SIZE

#### MAX_CLIENT_CHUNK_SIZE

    public static int MAX_CLIENT_CHUNK_SIZE

#### JVM_PARAMS_TO_PARAMS

    public static Map<String,String> JVM_PARAMS_TO_PARAMS

### Constructor Detail

#### SessionUtil

    public SessionUtil()

### Method Detail

#### deleteIdTokenCache

    public static void deleteIdTokenCache(String host,
                                          String user)

Delete the id token cache

#### deleteMfaTokenCache

    public static void deleteMfaTokenCache(String host,
                                           String user)

#### getCommonParams

    public static Map<String,Object> getCommonParams(com.fasterxml.jackson.databind.JsonNode paramsNode)

Helper function to parse a JsonNode from a GS response containing CommonParameters, emitting an EnumMap of parameters

Parameters:
  `paramsNode` - parameters in JSON form
Returns:
  map object including key and value pairs

#### resetOCSPUrlIfNecessary

    public static void resetOCSPUrlIfNecessary(String serverUrl)
                                        throws IOException

Reset OCSP cache server if the snowflake server URL is for private link. If the URL is not for private link, do nothing.

Parameters:
  `serverUrl` - The Snowflake URL includes protocol such as "https://"
Throws:
  `IOException`