Class ExternalBuildArtifactsCacheImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.artifacts.ExternalBuildArtifactsCacheImpl
-
- All Implemented Interfaces:
BuildsCleanupExtension
,ExternalBuildArtifactsCache
,ServerExtension
,TeamCityExtension
public class ExternalBuildArtifactsCacheImpl extends Object implements BuildsCleanupExtension, ExternalBuildArtifactsCache
-
-
Constructor Summary
Constructors Constructor Description ExternalBuildArtifactsCacheImpl(CachePaths cachePaths, ExecutorServices executorServices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanupBuildsData(BuildCleanupContext cleanupContext)
Invoked afterBuildsCleanupExtension.prepareBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
is called for all extensions.InputStream
getCachedStream(ExternalBuildArtifactFile artifact, FuncThrow<InputStream,IOException> streamAction)
Executes artifact content caching and returns input stream.boolean
isInCache(ExternalBuildArtifactFile artifact)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.cleanup.BuildsCleanupExtension
getCleanupBuildsDataConcurrencyLevel, getDisplayName, prepareBuildsData
-
-
-
-
Constructor Detail
-
ExternalBuildArtifactsCacheImpl
public ExternalBuildArtifactsCacheImpl(@NotNull CachePaths cachePaths, @NotNull ExecutorServices executorServices)
-
-
Method Detail
-
getCachedStream
@NotNull public InputStream getCachedStream(@NotNull ExternalBuildArtifactFile artifact, @NotNull FuncThrow<InputStream,IOException> streamAction) throws IOException
Description copied from interface:ExternalBuildArtifactsCache
Executes artifact content caching and returns input stream.- Specified by:
getCachedStream
in interfaceExternalBuildArtifactsCache
- Parameters:
artifact
- is an external artifact.streamAction
- action which returns stream from external storage.- Returns:
- cached input stream.
- Throws:
IOException
-
isInCache
public boolean isInCache(@NotNull ExternalBuildArtifactFile artifact)
-
cleanupBuildsData
public void cleanupBuildsData(@NotNull BuildCleanupContext cleanupContext) throws CleanupInterruptedException
Description copied from interface:BuildsCleanupExtension
Invoked afterBuildsCleanupExtension.prepareBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
is called for all extensions. There is no guarantee about ordering of the method execution for different extensions, they may be called simultaneously etc. It should perform db operations in current thread otherwise deadlock can occur.- Specified by:
cleanupBuildsData
in interfaceBuildsCleanupExtension
- Parameters:
cleanupContext
- cleanup context- Throws:
CleanupInterruptedException
- if the cleanup process was interrupted
-
-