Class TenantThresholdConfiguration

java.lang.Object
fr.gouv.vitam.common.storage.TenantThresholdConfiguration

public class TenantThresholdConfiguration extends Object
Configuration class for the tenant-specific storage threshold. The size unit is defined once at the StorageThresholdsConfiguration level and shared by all thresholds.
  • Constructor Details

    • TenantThresholdConfiguration

      public TenantThresholdConfiguration()
      Default constructor for deserialization
    • TenantThresholdConfiguration

      public TenantThresholdConfiguration(String tenants, Long threshold)
      Parameters:
      tenants - Tenant range expression the threshold applies to (e.g. "0", "1-3", "1, 3, 11-20"), parsed the same way as the Elasticsearch tenant indexation ranges
      threshold - Allocated storage threshold for the matching tenants, in the configured size unit
  • Method Details

    • getTenants

      public String getTenants()
      Returns:
      the tenant range expression (e.g. "1-3") the threshold applies to
    • setTenants

      public TenantThresholdConfiguration setTenants(String tenants)
    • getThreshold

      public Long getThreshold()
      Returns:
      the configured threshold, in the configured size unit
    • setThreshold

      public TenantThresholdConfiguration setThreshold(Long threshold)
      Parameters:
      threshold - Allocated storage threshold for the tenant, in the configured size unit
      Returns:
      This instance for chaining
      Throws:
      IllegalArgumentException - if the threshold is negative
    • toString

      public String toString()
      Overrides:
      toString in class Object