Interface RetentionPolicy

All Known Subinterfaces:
TimeToLiveRetentionPolicy

public interface RetentionPolicy

The retention policy of the ImportContainer. If not set, the ImportContainer does not expire.


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 com.fasterxml.jackson.core.type.TypeReference<RetentionPolicy> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference