public final class DataLakeLeaseClientBuilder extends Object
DataLakeLeaseClient and DataLakeLeaseAsyncClient are constructed every time
buildClient and buildAsyncClient are called
respectively.
When a client is instantiated and a leaseId hasn't been set a UUID will be used
as the lease identifier.
Instantiating LeaseClients
DataLakeLeaseClient dataLakeLeaseClient = new DataLakeLeaseClientBuilder()
.fileClient(fileClient)
.leaseId(leaseId)
.buildClient();
DataLakeLeaseClient dataLakeLeaseClient = new DataLakeLeaseClientBuilder()
.directoryClient(directoryClient)
.leaseId(leaseId)
.buildClient();
DataLakeLeaseClient dataLakeLeaseClient = new DataLakeLeaseClientBuilder()
.fileSystemClient(dataLakeFileSystemClient)
.leaseId(leaseId)
.buildClient();
Instantiating LeaseAsyncClients
DataLakeLeaseAsyncClient dataLakeLeaseAsyncClient = new DataLakeLeaseClientBuilder()
.fileAsyncClient(fileAsyncClient)
.leaseId(leaseId)
.buildAsyncClient();
DataLakeLeaseAsyncClient dataLakeLeaseAsyncClient = new DataLakeLeaseClientBuilder()
.directoryAsyncClient(directoryAsyncClient)
.leaseId(leaseId)
.buildAsyncClient();
DataLakeLeaseAsyncClient dataLakeLeaseAsyncClient = new DataLakeLeaseClientBuilder()
.fileSystemAsyncClient(dataLakeFileSystemAsyncClient)
.leaseId(leaseId)
.buildAsyncClient();
DataLakeLeaseClient,
DataLakeLeaseAsyncClient| Constructor and Description |
|---|
DataLakeLeaseClientBuilder()
Creates a new instance of
DataLakeLeaseClientBuilder. |
public DataLakeLeaseClientBuilder()
DataLakeLeaseClientBuilder.public DataLakeLeaseClient buildClient()
DataLakeLeaseClient based on the configurations set in the builder.DataLakeLeaseClient based on the configurations in this builder.public DataLakeLeaseAsyncClient buildAsyncClient()
DataLakeLeaseAsyncClient based on the configurations set in the builder.DataLakeLeaseAsyncClient based on the configurations in this builder.public DataLakeLeaseClientBuilder fileClient(DataLakeFileClient dataLakeFileClient)
DataLakeFileClient. This will set the HttpPipeline and
URL that are used to interact with the service.dataLakeFileClient - DataLakeFileClient used to configure the builder.NullPointerException - If DataLakeFileClient is null.public DataLakeLeaseClientBuilder fileAsyncClient(DataLakeFileAsyncClient dataLakeFileAsyncClient)
DataLakeFileAsyncClient. This will set the
HttpPipeline and URL that are used to interact with the service.dataLakeFileAsyncClient - DataLakeFileAsyncClient used to configure the builder.NullPointerException - If DataLakeFileAsyncClient is null.public DataLakeLeaseClientBuilder directoryClient(DataLakeDirectoryClient dataLakeDirectoryClient)
DataLakeDirectoryClient. This will set the
HttpPipeline and URL that are used to interact with the service.dataLakeDirectoryClient - DataLakeDirectoryClient used to configure the builder.NullPointerException - If DataLakeDirectoryClient is null.public DataLakeLeaseClientBuilder directoryAsyncClient(DataLakeDirectoryAsyncClient dataLakeDirectoryAsyncClient)
DataLakeDirectoryAsyncClient. This will set the
HttpPipeline and URL that are used to interact with the service.dataLakeDirectoryAsyncClient - DataLakeDirectoryAsyncClient used to configure the builder.NullPointerException - If DataLakeDirectoryAsyncClient is null.public DataLakeLeaseClientBuilder fileSystemClient(DataLakeFileSystemClient dataLakeFileSystemClient)
DataLakeFileSystemClient. This will set the
HttpPipeline and URL that are used to interact with the service.dataLakeFileSystemClient - DataLakeFileSystemClient used to configure the builder.NullPointerException - If dataLakeFileSystemClient is null.public DataLakeLeaseClientBuilder fileSystemAsyncClient(DataLakeFileSystemAsyncClient dataLakeFileSystemAsyncClient)
DataLakeFileSystemAsyncClient. This will set the HttpPipeline and URL that are used to interact with the service.dataLakeFileSystemAsyncClient - DataLakeFileSystemAsyncClient used to configure the builder.NullPointerException - If dataLakeFileSystemAsyncClient is null.public DataLakeLeaseClientBuilder leaseId(String leaseId)
If a lease ID isn't set then a UUID will be used.
leaseId - Identifier for the lease.Copyright © 2021 Microsoft Corporation. All rights reserved.