Package com.google.cloud.storage
Class BucketInfo.AgeDeleteRule
java.lang.Object
com.google.cloud.storage.BucketInfo.DeleteRule
com.google.cloud.storage.BucketInfo.AgeDeleteRule
- All Implemented Interfaces:
Serializable
- Enclosing class:
- BucketInfo
Deprecated.
Delete rule class that sets a Time To Live for blobs in the bucket.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.cloud.storage.BucketInfo.DeleteRule
BucketInfo.DeleteRule.Type
-
Constructor Summary
-
Method Summary
Methods inherited from class com.google.cloud.storage.BucketInfo.DeleteRule
equals, getType, hashCode
-
Constructor Details
-
AgeDeleteRule
public AgeDeleteRule(int daysToLive) Deprecated.Creates anAgeDeleteRule
object.- Parameters:
daysToLive
- blobs' Time To Live expressed in days. The time when the age condition is considered to be satisfied is computed by addingdaysToLive
days to the midnight following blob's creation time in UTC.
-
-
Method Details
-
getDaysToLive
public int getDaysToLive()Deprecated.
-
LifecycleRule
with aDeleteLifecycleAction
and useLifecycleCondition.Builder.setAge
instead.For example,
new DeleteLifecycleAction(1)
is equivalent tonew LifecycleRule( LifecycleAction.newDeleteAction(), LifecycleCondition.newBuilder().setAge(1).build()))