Interface StorageCappingService

    • 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 from AdministrationConfiguration.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 from AdministrationConfiguration.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 plans
        artifactSizeDiff - 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.
      • initializeStorageLimits

        void initializeStorageLimits()
        Check if current disk space used by artifacts fits soft/hard limits.