public class AgentBuildResultsSummaryManagerImpl extends Object implements AgentResultsSummaryManager
Constructor and Description |
---|
AgentBuildResultsSummaryManagerImpl(AgentBuildResultsSummaryDao agentBuildResultsSummaryDao,
BuildResultsSummaryDao buildResultsSummaryDao) |
Modifier and Type | Method and Description |
---|---|
long |
calculateUtilisedAgentTime(long agentId)
Calculates the time spent performing builds of an agent.
|
int |
countBuildResultsSummariesForAgent(BuildAgent buildAgent) |
int |
countFailedBuildResultsSummariesForAgent(BuildAgent buildAgent) |
List<BuildResultsSummary> |
getAllBuildResultsSummariesForAgent(Long agentId)
Returns all
BuildResultsSummary for the passed BuildAgent 's id. |
List<BuildResultsSummary> |
getBuildResultsSummariesForAgent(Long agentId,
int firstResult,
int maxResult)
Returns a list of
BuildResultsSummary for the passed BuildAgent 's id in the given range. |
BuildResultsSummary |
getLastBuildForAgent(String planKey,
Long agentId) |
BuildResultsSummary |
getLastSuccessfulBuildForAgent(String planKey,
Long agentId) |
List<BuildResultsSummary> |
getLatestSummariesForAgent(Long agentId,
Date fromDate)
Retrieves build summaries for agent id not older than certain date.
|
List<BuildResultsSummary> |
getLatestSummariesForAgent(Long agentId,
int maxCount)
Retrieves n last build summaries for agent.
|
BuildResultsSummary |
getLatestSummaryForAgent(long agentId) |
long |
getNumberOfSummariesForAgent(long agentId)
Retrieves the total count of build summaries executed on an agent.
|
public AgentBuildResultsSummaryManagerImpl(@NotNull AgentBuildResultsSummaryDao agentBuildResultsSummaryDao, @NotNull BuildResultsSummaryDao buildResultsSummaryDao)
@Nullable public BuildResultsSummary getLastBuildForAgent(@NotNull String planKey, @NotNull Long agentId)
getLastBuildForAgent
in interface AgentResultsSummaryManager
@Nullable public BuildResultsSummary getLastSuccessfulBuildForAgent(@NotNull String planKey, @NotNull Long agentId)
getLastSuccessfulBuildForAgent
in interface AgentResultsSummaryManager
public int countBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
countBuildResultsSummariesForAgent
in interface AgentResultsSummaryManager
public int countFailedBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
countFailedBuildResultsSummariesForAgent
in interface AgentResultsSummaryManager
@NotNull public List<BuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull Long agentId)
AgentResultsSummaryManager
BuildResultsSummary
for the passed BuildAgent
's id.getAllBuildResultsSummariesForAgent
in interface AgentResultsSummaryManager
agentId
- id of the agent to get the result summaries forBuildResultsSummary
for the passed BuildAgent
's id.@NotNull public List<BuildResultsSummary> getBuildResultsSummariesForAgent(@NotNull Long agentId, int firstResult, int maxResult)
AgentResultsSummaryManager
BuildResultsSummary
for the passed BuildAgent
's id in the given range.getBuildResultsSummariesForAgent
in interface AgentResultsSummaryManager
public long getNumberOfSummariesForAgent(long agentId)
AgentResultsSummaryManager
getNumberOfSummariesForAgent
in interface AgentResultsSummaryManager
agentId
- id of an agent@NotNull public List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull Long agentId, @NotNull Date fromDate)
AgentResultsSummaryManager
getLatestSummariesForAgent
in interface AgentResultsSummaryManager
agentId
- id of an agentfromDate
- beginning of the search periodList
of BuildResultsSummary
@NotNull public List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull Long agentId, int maxCount)
AgentResultsSummaryManager
getLatestSummariesForAgent
in interface AgentResultsSummaryManager
agentId
- id of an agentmaxCount
- maximum number of elements to retrieveList
of BuildResultsSummary
@Nullable public BuildResultsSummary getLatestSummaryForAgent(long agentId)
getLatestSummaryForAgent
in interface AgentResultsSummaryManager
public long calculateUtilisedAgentTime(@NotNull long agentId)
AgentResultsSummaryManager
calculateUtilisedAgentTime
in interface AgentResultsSummaryManager
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.