Interface ArtifactStorageDiskUsageInfo
-
- All Known Implementing Classes:
DefaultArtifactStorageDiskUsageInfo,ExternalArtifactStorageDiskUsageInfo
public interface ArtifactStorageDiskUsageInfoProvides information about external or built-in artifact storage. The information is mainly used for disk usage per-project statistics- Since:
- 2020.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanStoreArtifactsOfBuild(SBuild build)booleancanStoreArtifactsOfBuildType(SBuildType buildType)Checks if the build type can store artifacts in this storage (e.g.booleancanStoreArtifactsOfProject(File artifactsDirectory, SProject project)StringgetDescriptiveName()Returns a descriptive name of the storage.ArtifactStorageDiskUsageCalculatorgetDiskUsageCalcualtor()StringgetId()StringgetName()Returns a name of the storage.StringgetType()Returns a type of this storage (e.g.booleanisDefaultForBuildType(SBuildType buildType)Checks if the storage is default for this build type.
-
-
-
Method Detail
-
getId
@NotNull String getId()
- Returns:
- a unique storage id
-
getName
@NotNull String getName()
Returns a name of the storage. For external storages a name is configured on a project level, while a path is used as a name for built-in storages- Returns:
- storage name
-
getDescriptiveName
@NotNull String getDescriptiveName()
Returns a descriptive name of the storage. In comparison togetName()this name should be more verbose to distinguish storages better. For example, it may contain a name of the project, were given external storage was configured- Returns:
- descriptive storage name
-
getType
@NotNull String getType()
Returns a type of this storage (e.g. S3, Google, Built-in etc.)- Returns:
- storage type
-
getDiskUsageCalcualtor
@NotNull ArtifactStorageDiskUsageCalculator getDiskUsageCalcualtor()
- Returns:
- calculator, which is used for computing sizes, occupied of builds on this storage
-
canStoreArtifactsOfBuild
default boolean canStoreArtifactsOfBuild(@NotNull SBuild build)- Parameters:
build- target build- Returns:
- true if artifacts of this build can be stored in this storage
-
canStoreArtifactsOfProject
boolean canStoreArtifactsOfProject(@NotNull File artifactsDirectory, @NotNull SProject project)- Parameters:
artifactsDirectory- build artifacts directoryproject- targe build project- Returns:
- true if artifacts of this build project can be stored in this storage
-
canStoreArtifactsOfBuildType
boolean canStoreArtifactsOfBuildType(@NotNull SBuildType buildType)Checks if the build type can store artifacts in this storage (e.g. the storage is accessible by the build type)- Parameters:
buildType- target build type- Returns:
- true if artifacts of this build type can be stored in this storage
-
isDefaultForBuildType
boolean isDefaultForBuildType(@NotNull SBuildType buildType)Checks if the storage is default for this build type. Default storages are used to store logs and internal artifacts, and for now it could be only built-in storage- Parameters:
buildType- target build type
-
-