Package alluxio.underfs.oss
Class StsOssClientProvider
- java.lang.Object
-
- alluxio.underfs.oss.StsOssClientProvider
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class StsOssClientProvider extends java.lang.Object implements java.io.CloseableSTS client provider for Aliyun OSS.
-
-
Constructor Summary
Constructors Constructor Description StsOssClientProvider(alluxio.underfs.UnderFileSystemConfiguration ossConfiguration)Constructs a new instance ofStsOssClientProvider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voidcreateOrRefreshOssStsClient(alluxio.underfs.UnderFileSystemConfiguration ossConfiguration)Create Or Refresh the STS OSS client.com.aliyun.oss.OSSgetOSSClient()Returns the STS OSS client.voidinit()InitStsOssClientProvider.protected voidsetOssClientBuilder(com.aliyun.oss.OSSClientBuilder ossClientBuilder)
-
-
-
Constructor Detail
-
StsOssClientProvider
public StsOssClientProvider(alluxio.underfs.UnderFileSystemConfiguration ossConfiguration)
Constructs a new instance ofStsOssClientProvider.- Parameters:
ossConfiguration-UnderFileSystemConfigurationfor OSS
-
-
Method Detail
-
init
public void init() throws java.io.IOExceptionInitStsOssClientProvider.- Throws:
java.io.IOException- if failed to init OSS Client
-
createOrRefreshOssStsClient
protected void createOrRefreshOssStsClient(alluxio.underfs.UnderFileSystemConfiguration ossConfiguration) throws java.io.IOExceptionCreate Or Refresh the STS OSS client.- Parameters:
ossConfiguration- OSSUnderFileSystemConfiguration- Throws:
java.io.IOException- if failed to create or refresh OSS client
-
getOSSClient
public com.aliyun.oss.OSS getOSSClient()
Returns the STS OSS client.- Returns:
- oss client
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
setOssClientBuilder
protected void setOssClientBuilder(com.aliyun.oss.OSSClientBuilder ossClientBuilder)
-
-