@Component public class StorageCappingServiceImpl extends Object implements StorageCappingService
ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED| Constructor and Description |
|---|
StorageCappingServiceImpl() |
| 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 artifactSize)
Invalidate disk usage values, check soft/hard limit boundaries and send notifications.
|
public boolean isHardLimitExceeded()
StorageCappingServiceAdministrationConfiguration.getStorageLimit() is exceeded by local disk
space usage.isHardLimitExceeded in interface StorageCappingServicepublic boolean isSoftLimitExceeded()
StorageCappingServiceAdministrationConfiguration.getStorageLimit() is exceeded by local disk
space usage.isSoftLimitExceeded in interface StorageCappingServicepublic void onArtifactUpdated(@Nullable
PlanResultKey cause,
long artifactSize)
StorageCappingServiceonArtifactUpdated in interface StorageCappingServicecause - planResultKey which caused artifact storage size recalculation. It will be ignored when cancel running plansartifactSize - 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 StorageCappingService.ARTIFACT_WITH_UNKNOWN_SIZE_REMOVED if size is unknown.public void initializeStorageLimits()
StorageCappingServiceinitializeStorageLimits in interface StorageCappingServiceCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.