Interface RetentionPolicy
- All Known Subinterfaces:
TimeToLiveRetentionPolicy
public interface RetentionPolicy
Defines how long an ImportContainer is kept before it is automatically deleted. When you set retentionPolicy on an ImportContainerDraft, the timeToLive value controls expiry. When you omit retentionPolicy on create, the Import API applies a default time to live of 72 hours (see expiresAt on ImportContainer).
Example to create a subtype instance using the builder pattern
RetentionPolicy retentionPolicy = RetentionPolicy.ttlBuilder()
config(configBuilder -> configBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptioncopyDeep()static RetentionPolicydeepCopy(RetentionPolicy template) factory method to create a deep copy of RetentionPolicy@NotNull StrategyEnumThe strategy of the retention policy.builder for ttl subtypestatic tools.jackson.core.type.TypeReference<RetentionPolicy>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithRetentionPolicy(Function<RetentionPolicy, T> helper) accessor map function
-
Method Details
-
getStrategy
The strategy of the retention policy. Used to determine how the ImportContainer should be retained.
- Returns:
- strategy
-
copyDeep
RetentionPolicy copyDeep() -
deepCopy
factory method to create a deep copy of RetentionPolicy- Parameters:
template- instance to be copied- Returns:
- copy instance
-
ttlBuilder
builder for ttl subtype- Returns:
- builder
-
withRetentionPolicy
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-