Package net.snowflake.client.jdbc.cloud.storage

## Class StorageClientFactory

- java.lang.Object
- - net.snowflake.client.jdbc.cloud.storage.StorageClientFactory

    public class StorageClientFactory
    extends Object

Factory object for abstracting the creation of storage client objects: SnowflakeStorageClient and StorageObjectMetadata

Author:
  lgiakoumakis

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`SnowflakeStorageClient` `createClient​(StageInfo stage, int parallel, net.snowflake.common.core.RemoteStoreFileEncryptionMaterial encMat, SFSession session)` Creates a storage client based on the value of stageLocationType
`StorageObjectMetadata` `createStorageMetadataObj​(StageInfo.StageType stageType)` Creates a storage provider specific metadata object, accessible via the platform independent interface
`static StorageClientFactory` `getFactory()` Creates or returns the single instance of the factory object

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

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

### Method Detail

#### getFactory

    public static StorageClientFactory getFactory()

Creates or returns the single instance of the factory object

Returns:
  the storage client instance

#### createClient

    public SnowflakeStorageClient createClient​(StageInfo stage,
                                               int parallel,
                                               net.snowflake.common.core.RemoteStoreFileEncryptionMaterial encMat,
                                               SFSession session)
                                        throws SnowflakeSQLException

Creates a storage client based on the value of stageLocationType

Parameters:
  `stage` - the stage properties
  `parallel` - the degree of parallelism to be used by the client
  `encMat` - encryption material for the client
Returns:
  a SnowflakeStorageClient interface to the instance created
Throws:
  `SnowflakeSQLException` - if any error occurs

#### createStorageMetadataObj

    public StorageObjectMetadata createStorageMetadataObj​(StageInfo.StageType stageType)

Creates a storage provider specific metadata object, accessible via the platform independent interface

Parameters:
  `stageType` - determines the implementation to be created
Returns:
  the implementation of StorageObjectMetadata