Package com.atlassian.bamboo.storage
Interface StorageCappingService
-
- All Known Implementing Classes:
StorageCappingServiceImpl
@Internal public interface StorageCappingService
- Since:
- 5.9
-
-
Field Summary
Fields Modifier and Type Field Description static long
ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
initializeStorageLimits()
Check if current disk space used by artifacts fits soft/hard limits.boolean
isHardLimitExceeded()
Check if hard limit fromAdministrationConfiguration.getStorageLimit()
is exceeded by local disk space usage.boolean
isSoftLimitExceeded()
Check if soft limit fromAdministrationConfiguration.getStorageLimit()
is exceeded by local disk space usage.void
onArtifactUpdated(@Nullable PlanResultKey cause, long artifactSizeDiff)
Invalidate disk usage values, check soft/hard limit boundaries and send notifications.
-
-
-
Field Detail
-
ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED
static final long ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED
- See Also:
- Constant Field Values
-
-
Method Detail
-
isHardLimitExceeded
boolean isHardLimitExceeded()
Check if hard limit fromAdministrationConfiguration.getStorageLimit()
is exceeded by local disk space usage.- Returns:
- false if feature is disabled or S3 artifact handler is enabled or disk usage is lower than hard limit
-
isSoftLimitExceeded
boolean isSoftLimitExceeded()
Check if soft limit fromAdministrationConfiguration.getStorageLimit()
is exceeded by local disk space usage.- Returns:
- false if feature is disabled or S3 artifact handler is enabled or disk usage is lower than soft limit
-
onArtifactUpdated
void onArtifactUpdated(@Nullable @Nullable PlanResultKey cause, long artifactSizeDiff)
Invalidate disk usage values, check soft/hard limit boundaries and send notifications. Call of this method can be expensive if artifact table is large.- Parameters:
cause
- planResultKey which caused artifact storage size recalculation. It will be ignored when cancel running plansartifactSizeDiff
- can be positive or negative. If artifact was created, use it's size. If size is unknown, use 0. If artifact was removed then use negative size (artifact_size*-1) or useARTIFACT_WITH_UNKNOWN_SIZE_REMOVED
if size is unknown.
-
initializeStorageLimits
void initializeStorageLimits()
Check if current disk space used by artifacts fits soft/hard limits.
-
-