DataLakeLeaseClientBuilder Class
- java.
lang. Object - com.
azure. storage. file. datalake. specialized. DataLakeLeaseClientBuilder
- com.
public final class DataLakeLeaseClientBuilder
This class provides a fluent builder API to help aid the configuration and instantiation of Storage Lease clients. Lease clients are able to interact with both file system and path clients and act as a supplement client. A new instance of DataLakeLeaseClient and DataLakeLeaseAsyncClient are constructed every time buildClient() and buildAsyncClient() are called respectively.
When a client is instantiated and a leaseId(String 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();
Constructor Summary
| Constructor | Description |
|---|---|
| DataLakeLeaseClientBuilder() |
Creates a new instance of DataLakeLeaseClientBuilder. |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
DataLakeLeaseClientBuilder
public DataLakeLeaseClientBuilder()
Creates a new instance of DataLakeLeaseClientBuilder.
Method Details
buildAsyncClient
public DataLakeLeaseAsyncClient buildAsyncClient()
Creates a DataLakeLeaseAsyncClient based on the configurations set in the builder.
Returns:
buildClient
public DataLakeLeaseClient buildClient()
Creates a DataLakeLeaseClient based on the configurations set in the builder.
Returns:
directoryAsyncClient
public DataLakeLeaseClientBuilder directoryAsyncClient(DataLakeDirectoryAsyncClient dataLakeDirectoryAsyncClient)
Configures the builder based on the passed DataLakeDirectoryAsyncClient. This will set the HttpPipeline and URL that are used to interact with the service.
Parameters:
Returns:
directoryClient
public DataLakeLeaseClientBuilder directoryClient(DataLakeDirectoryClient dataLakeDirectoryClient)
Configures the builder based on the passed DataLakeDirectoryClient. This will set the HttpPipeline and URL that are used to interact with the service.
Parameters:
Returns:
fileAsyncClient
public DataLakeLeaseClientBuilder fileAsyncClient(DataLakeFileAsyncClient dataLakeFileAsyncClient)
Configures the builder based on the passed DataLakeFileAsyncClient. This will set the HttpPipeline and URL that are used to interact with the service.
Parameters:
Returns:
fileClient
public DataLakeLeaseClientBuilder fileClient(DataLakeFileClient dataLakeFileClient)
Configures the builder based on the passed DataLakeFileClient. This will set the HttpPipeline and URL that are used to interact with the service.
Parameters:
Returns:
fileSystemAsyncClient
public DataLakeLeaseClientBuilder fileSystemAsyncClient(DataLakeFileSystemAsyncClient dataLakeFileSystemAsyncClient)
Configures the builder based on the passed DataLakeFileSystemAsyncClient. This will set the HttpPipeline and URL that are used to interact with the service.
Parameters:
Returns:
fileSystemClient
public DataLakeLeaseClientBuilder fileSystemClient(DataLakeFileSystemClient dataLakeFileSystemClient)
Configures the builder based on the passed DataLakeFileSystemClient. This will set the HttpPipeline and URL that are used to interact with the service.
Parameters:
Returns:
leaseId
public DataLakeLeaseClientBuilder leaseId(String leaseId)
Sets the identifier for the lease.
If a lease ID isn't set then a UUID will be used.
Parameters:
Returns: