Package com.google.cloud.storage
Class BucketInfo.LifecycleRule.LifecycleAction
java.lang.Object
com.google.cloud.storage.BucketInfo.LifecycleRule.LifecycleAction
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BucketInfo.LifecycleRule.AbortIncompleteMPUAction
,BucketInfo.LifecycleRule.DeleteLifecycleAction
,BucketInfo.LifecycleRule.SetStorageClassLifecycleAction
- Enclosing class:
- BucketInfo.LifecycleRule
Base class for the Action to take when a Lifecycle Condition is met. Supported Actions are
expressed as subclasses of this class, accessed by static factory methods.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
Create a newAbortIncompleteMPUAction
.Creates a newDeleteLifecycleAction
.newLifecycleAction
(@NonNull String actionType) Creates a newLifecycleAction
, with no specific supported action associated with it.newSetStorageClassAction
(@NonNull StorageClass storageClass) Creates a newSetStorageClassLifecycleAction
.toString()
-
Constructor Details
-
LifecycleAction
-
-
Method Details
-
getActionType
-
toString
-
equals
-
hashCode
public int hashCode() -
newDeleteAction
Creates a newDeleteLifecycleAction
. Blobs that meet the Condition associated with this action will be deleted. -
newSetStorageClassAction
public static BucketInfo.LifecycleRule.SetStorageClassLifecycleAction newSetStorageClassAction(@NonNull StorageClass storageClass) Creates a newSetStorageClassLifecycleAction
. A Blob's storage class that meets the action's conditions will be changed to the specified storage class.- Parameters:
storageClass
- The new storage class to use when conditions are met for this action.
-
newAbortIncompleteMPUploadAction
Create a newAbortIncompleteMPUAction
. An incomplete multipart upload will be aborted when the multipart upload meets the specified condition. Age is the only condition supported for this action. See: https://cloud.google.com/storage/docs/lifecycle##abort-mpu -
newLifecycleAction
public static BucketInfo.LifecycleRule.LifecycleAction newLifecycleAction(@NonNull String actionType) Creates a newLifecycleAction
, with no specific supported action associated with it. This is only intended as a "backup" for when the library doesn't recognize the type, and should generally not be used, instead use the supported actions, and upgrade the library if necessary to get new supported actions.
-