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 Details

    • getStrategy

      @NotNull @NotNull StrategyEnum getStrategy()

      The strategy of the retention policy. Used to determine how the ImportContainer should be retained.

      Returns:
      strategy
    • copyDeep

      RetentionPolicy copyDeep()
    • deepCopy

      @Nullable static RetentionPolicy deepCopy(@Nullable RetentionPolicy template)
      factory method to create a deep copy of RetentionPolicy
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • ttlBuilder

      static TimeToLiveRetentionPolicyBuilder ttlBuilder()
      builder for ttl subtype
      Returns:
      builder
    • withRetentionPolicy

      default <T> T withRetentionPolicy(Function<RetentionPolicy,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<RetentionPolicy> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference