Class FileScheduleDeletionOptions
java.lang.Object
com.azure.storage.file.datalake.options.FileScheduleDeletionOptions
Parameters for Schedule Deletion.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates emptyFileScheduleDeletionOptions
.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 theOffsetDateTime
when the file will be deleted. -
Method Summary
Modifier and TypeMethodDescriptionGets theOffsetDateTime
to set for when the file will be deleted.Gets the offset to set the expiry time relative to.Gets the duration before the file will be deleted.
-
Constructor Details
-
FileScheduleDeletionOptions
public FileScheduleDeletionOptions()Creates emptyFileScheduleDeletionOptions
. If the file was scheduled for deletion, the deletion will be cancelled. -
FileScheduleDeletionOptions
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.- Throws:
NullPointerException
- IftimeToExpire
orexpiryRelativeTo
is null.
-
FileScheduleDeletionOptions
Sets theOffsetDateTime
when the file will be deleted.- Parameters:
expiresOn
- TheOffsetDateTime
when the file will be deleted.- Throws:
NullPointerException
- IfexpiresOn
is null.
-
-
Method Details
-
getTimeToExpire
Gets the duration before the file will be deleted.- Returns:
- Duration before file should be deleted.
-
getExpiryRelativeTo
Gets the offset to set the expiry time relative to.- Returns:
- if
getTimeToExpire()
should be set relative to the file's creation time, or the current time.
-
getExpiresOn
Gets theOffsetDateTime
to set for when the file will be deleted.- Returns:
- The
OffsetDateTime
to set for when the file will be deleted.
-