FileScheduleDeletionOptions Class

  • java.lang.Object
    • com.azure.storage.file.datalake.options.FileScheduleDeletionOptions

public class FileScheduleDeletionOptions

Parameters for Schedule Deletion.

Constructor Summary

Constructor Description
FileScheduleDeletionOptions()

Creates empty FileScheduleDeletionOptions.

FileScheduleDeletionOptions(Duration timeToExpire, FileExpirationOffset expiryRelativeTo)

Sets time when the file will be deleted, relative to the file creation time or the current time.

FileScheduleDeletionOptions(OffsetDateTime expiresOn)

Sets the OffsetDateTime when the file will be deleted.

Method Summary

Modifier and Type Method and Description
OffsetDateTime getExpiresOn()
FileExpirationOffset getExpiryRelativeTo()
Duration getTimeToExpire()

Methods inherited from java.lang.Object

Constructor Details

FileScheduleDeletionOptions

public FileScheduleDeletionOptions()

Creates empty FileScheduleDeletionOptions. If the file was scheduled for deletion, the deletion will be cancelled.

FileScheduleDeletionOptions

public FileScheduleDeletionOptions(Duration timeToExpire, FileExpirationOffset expiryRelativeTo)

Sets time when the file will be deleted, relative to the file creation time or the current time.

Parameters:

timeToExpire - Duration before file will be deleted.
expiryRelativeTo - Specifies if TimeToExpire should be set relative to the file's creation time, or the current time.

FileScheduleDeletionOptions

public FileScheduleDeletionOptions(OffsetDateTime expiresOn)

Sets the OffsetDateTime when the file will be deleted.

Parameters:

expiresOn - The OffsetDateTime when the file will be deleted.

Method Details

getExpiresOn

public OffsetDateTime getExpiresOn()

Returns:

The OffsetDateTime to set for when the file will be deleted.

getExpiryRelativeTo

public FileExpirationOffset getExpiryRelativeTo()

Returns:

if getTimeToExpire() should be set relative to the file's creation time, or the current time.

getTimeToExpire

public Duration getTimeToExpire()

Returns:

Duration before file should be deleted.

Applies to