@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()
StorageCappingService
AdministrationConfiguration.getStorageLimit()
is exceeded by local disk
space usage.isHardLimitExceeded
in interface StorageCappingService
public boolean isSoftLimitExceeded()
StorageCappingService
AdministrationConfiguration.getStorageLimit()
is exceeded by local disk
space usage.isSoftLimitExceeded
in interface StorageCappingService
public void onArtifactUpdated(@Nullable PlanResultKey cause, long artifactSize)
StorageCappingService
onArtifactUpdated
in interface StorageCappingService
cause
- 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()
StorageCappingService
initializeStorageLimits
in interface StorageCappingService
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.