Class DownloadedArtifactsLoggerImpl

    • Constructor Detail

      • DownloadedArtifactsLoggerImpl

        public DownloadedArtifactsLoggerImpl()
    • Method Detail

      • setServer

        public void setServer​(SBuildServer server)
      • 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 interface DownloadedArtifactsLogger
        Parameters:
        downloadedBy - id of a build which initiated artifact download
        downloadedFrom - id of a build from which the artifact was downloaded
        artifactPath - path to a artifact
      • waitForQueuePersisting

        public void waitForQueuePersisting()
      • 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 interface DownloadedArtifactsLoggerEx
        Parameters:
        buildId - id of the build of interest
        Returns:
        see above
      • buildArtifactsWereDownloaded

        public boolean buildArtifactsWereDownloaded​(long sourceBuildId)
        Specified by:
        buildArtifactsWereDownloaded in interface DownloadedArtifactsLogger
        Parameters:
        sourceBuildId - id of the build which provided artifacts
        Returns:
        true if there are builds which downloaded artifacts from the build with specified id.