Class DownloadedArtifactsLoggerImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.DownloadedArtifactsLoggerImpl
-
- All Implemented Interfaces:
DownloadedArtifactsLogger
,DownloadedArtifactsLoggerEx
public class DownloadedArtifactsLoggerImpl extends Object implements DownloadedArtifactsLoggerEx
- Author:
- Pavel.Sher Date: 14.05.2007
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DownloadedArtifactsLoggerImpl.DownloadedArtifactsImpl
-
Field Summary
Fields Modifier and Type Field Description static String
QUEUE_FLUSH_DELAY_PROP
-
Constructor Summary
Constructors Constructor Description DownloadedArtifactsLoggerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
buildArtifactsWereDownloaded(long sourceBuildId)
void
clearCache(Long buildId)
DownloadedArtifactsEx
getDownloadedArtifacts(long downloadedBy)
Returns list of artifacts downloaded by build with specified build idDownloadedArtifactsLoggerImpl.DownloadedArtifactsImpl
getProvidedArtifacts(long downloadedFrom)
Returns list of artifacts provided by the build with specified id to other buildsCollection<Long>
getSourceBuildIds(long downloadedBy)
Returns collection of build ids from which artifacts were downloaded by build with specified idboolean
hasComputedSourceBuilds(long buildId)
Returns true if information about source builds ids for specified build id is in cachevoid
logArtifactDownload(long downloadedBy, long downloadedFrom, String artifactPath)
Logs artifact download action into the database.void
setExecutorServices(ExecutorServices executorServices)
void
setNodesBuildsEvents(NodesBuildsEvents nodesBuildsEvents)
void
setSecurityContext(SecurityContextEx securityContext)
void
setServer(SBuildServer server)
void
setServerResponsibility(ServerResponsibility serverResponsibility)
void
setSqlRunner(SQLRunnerEx SQLRunner)
void
setTimeService(TimeService ts)
void
waitForQueuePersisting()
-
-
-
Field Detail
-
QUEUE_FLUSH_DELAY_PROP
public static final String QUEUE_FLUSH_DELAY_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
setServer
public void setServer(SBuildServer server)
-
clearCache
public void clearCache(@Nullable Long buildId)
- Specified by:
clearCache
in interfaceDownloadedArtifactsLoggerEx
-
setSqlRunner
public void setSqlRunner(SQLRunnerEx SQLRunner)
-
setSecurityContext
public void setSecurityContext(SecurityContextEx securityContext)
-
setExecutorServices
public void setExecutorServices(@NotNull ExecutorServices executorServices)
-
setTimeService
public void setTimeService(@NotNull TimeService ts)
-
setNodesBuildsEvents
public void setNodesBuildsEvents(@NotNull NodesBuildsEvents nodesBuildsEvents)
-
setServerResponsibility
public void setServerResponsibility(ServerResponsibility serverResponsibility)
-
logArtifactDownload
public void logArtifactDownload(long downloadedBy, long downloadedFrom, @NotNull String artifactPath)
Description copied from interface:DownloadedArtifactsLogger
Logs artifact download action into the database.- Specified by:
logArtifactDownload
in interfaceDownloadedArtifactsLogger
- Parameters:
downloadedBy
- id of a build which initiated artifact downloaddownloadedFrom
- id of a build from which the artifact was downloadedartifactPath
- path to a artifact
-
waitForQueuePersisting
public void waitForQueuePersisting()
-
getDownloadedArtifacts
public DownloadedArtifactsEx getDownloadedArtifacts(long downloadedBy)
Description copied from interface:DownloadedArtifactsLogger
Returns list of artifacts downloaded by build with specified build id- Specified by:
getDownloadedArtifacts
in interfaceDownloadedArtifactsLogger
- Parameters:
downloadedBy
- id of the build- Returns:
- list of downloaded artifacts
-
getSourceBuildIds
@NotNull public Collection<Long> getSourceBuildIds(long downloadedBy)
Returns collection of build ids from which artifacts were downloaded by build with specified id- Parameters:
downloadedBy
- id of the build- Returns:
- list of source build ids
-
hasComputedSourceBuilds
public boolean hasComputedSourceBuilds(long buildId)
Description copied from interface:DownloadedArtifactsLoggerEx
Returns true if information about source builds ids for specified build id is in cache- Specified by:
hasComputedSourceBuilds
in interfaceDownloadedArtifactsLoggerEx
- Parameters:
buildId
- id of the build of interest- Returns:
- see above
-
getProvidedArtifacts
public DownloadedArtifactsLoggerImpl.DownloadedArtifactsImpl getProvidedArtifacts(long downloadedFrom)
Description copied from interface:DownloadedArtifactsLogger
Returns list of artifacts provided by the build with specified id to other builds- Specified by:
getProvidedArtifacts
in interfaceDownloadedArtifactsLogger
- Parameters:
downloadedFrom
- id of the build - artifacts provider- Returns:
- see above
-
buildArtifactsWereDownloaded
public boolean buildArtifactsWereDownloaded(long sourceBuildId)
- Specified by:
buildArtifactsWereDownloaded
in interfaceDownloadedArtifactsLogger
- Parameters:
sourceBuildId
- id of the build which provided artifacts- Returns:
- true if there are builds which downloaded artifacts from the build with specified id.
-
-