@Internal
public interface StorageCappingService
Modifier and Type | Field and Description |
---|---|
static long |
ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED |
Modifier and Type | Method and Description |
---|---|
void |
initializeStorageLimits()
Check if current disk space used by artifacts fits soft/hard limits.
|
boolean |
isHardLimitExceeded()
Check if hard limit from
AdministrationConfiguration.getStorageLimit() is exceeded by local disk
space usage. |
boolean |
isSoftLimitExceeded()
Check if soft limit from
AdministrationConfiguration.getStorageLimit() is exceeded by local disk
space usage. |
void |
onArtifactUpdated(PlanResultKey cause,
long artifactSizeDiff)
Invalidate disk usage values, check soft/hard limit boundaries and send notifications.
|
static final long ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED
boolean isHardLimitExceeded()
AdministrationConfiguration.getStorageLimit()
is exceeded by local disk
space usage.boolean isSoftLimitExceeded()
AdministrationConfiguration.getStorageLimit()
is exceeded by local disk
space usage.void onArtifactUpdated(@Nullable PlanResultKey cause, long artifactSizeDiff)
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
use ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED
if size is unknown.void initializeStorageLimits()
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.