Package fr.gouv.vitam.common.storage
Class TenantThresholdConfiguration
java.lang.Object
fr.gouv.vitam.common.storage.TenantThresholdConfiguration
Configuration class for the tenant-specific storage threshold. The size unit is defined once at the
StorageThresholdsConfiguration level and shared by all thresholds.-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for deserializationTenantThresholdConfiguration(String tenants, Long threshold) -
Method Summary
Modifier and TypeMethodDescriptionsetTenants(String tenants) setThreshold(Long threshold) toString()
-
Constructor Details
-
TenantThresholdConfiguration
public TenantThresholdConfiguration()Default constructor for deserialization -
TenantThresholdConfiguration
- 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 rangesthreshold- Allocated storage threshold for the matching tenants, in the configured size unit
-
-
Method Details
-
getTenants
- Returns:
- the tenant range expression (e.g.
"1-3") the threshold applies to
-
setTenants
-
getThreshold
- Returns:
- the configured threshold, in the configured size unit
-
setThreshold
- 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
-