Class StorageObjectSummary
- java.lang.Object
-
- net.snowflake.client.jdbc.cloud.storage.StorageObjectSummary
-
public class StorageObjectSummary extends Object
Storage platform agnostic class that encapsulates remote storage object properties- Author:
- lgiakoumakis
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StorageObjectSummary
createFromAzureListBlobItem(com.microsoft.azure.storage.blob.ListBlobItem listBlobItem)
Constructs a StorageObjectSummary object from Azure BLOB properties Using factory methods to create these objects since Azure can throw, while retrieving the BLOB propertiesstatic StorageObjectSummary
createFromGcsBlob(com.google.cloud.storage.Blob blob)
createFromGcsBlob creates a StorageObjectSummary from a GCS blob objectstatic StorageObjectSummary
createFromS3ObjectSummary(com.amazonaws.services.s3.model.S3ObjectSummary objSummary)
Constructs a StorageObjectSummary object from the S3 equivalent S3ObjectSummaryString
getKey()
String
getLocation()
String
getMD5()
long
getSize()
-
-
-
Method Detail
-
createFromS3ObjectSummary
public static StorageObjectSummary createFromS3ObjectSummary(com.amazonaws.services.s3.model.S3ObjectSummary objSummary)
Constructs a StorageObjectSummary object from the S3 equivalent S3ObjectSummary- Parameters:
objSummary
- the AWS S3 ObjectSummary object to copy from- Returns:
- the ObjectSummary object created
-
createFromAzureListBlobItem
public static StorageObjectSummary createFromAzureListBlobItem(com.microsoft.azure.storage.blob.ListBlobItem listBlobItem) throws StorageProviderException
Constructs a StorageObjectSummary object from Azure BLOB properties Using factory methods to create these objects since Azure can throw, while retrieving the BLOB properties- Parameters:
listBlobItem
- an Azure ListBlobItem object- Returns:
- the ObjectSummary object created
- Throws:
StorageProviderException
-
createFromGcsBlob
public static StorageObjectSummary createFromGcsBlob(com.google.cloud.storage.Blob blob)
createFromGcsBlob creates a StorageObjectSummary from a GCS blob object- Parameters:
blob
- GCS blob object- Returns:
- a new StorageObjectSummary
-
getLocation
public String getLocation()
- Returns:
- returns the location of the object
-
getKey
public String getKey()
- Returns:
- returns the key property of the object
-
getMD5
public String getMD5()
- Returns:
- returns the MD5 hash of the object
-
getSize
public long getSize()
- Returns:
- returns the size property of the object
-
-