jetbrains.buildServer.serverSide
Class BuildEstimates

java.lang.Object
  extended by jetbrains.buildServer.serverSide.BuildEstimates

public class BuildEstimates
extends java.lang.Object

Holds data that describes estimates for a queued build.

Author:
Sergey.Anchipolevsky Date: 02.07.2007

Constructor Summary
BuildEstimates(TimeInterval timeInterval, BuildAgent agent, WaitReason waitReason, boolean delayed)
          Initializes the instance.
 
Method Summary
 BuildAgent getAgent()
           
 TimeInterval getTimeInterval()
           
 WaitReason getWaitReason()
          There is one obvious reason for not running a build -- there's no available agents.
 boolean isDelayed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildEstimates

public BuildEstimates(@Nullable
                      TimeInterval timeInterval,
                      @Nullable
                      BuildAgent agent,
                      @Nullable
                      WaitReason waitReason,
                      boolean delayed)
Initializes the instance. For parameter semantics see the javadoc for the corresponding getters.

Parameters:
timeInterval - see getter
agent - see getter
waitReason - special wait reason
delayed - indicates if this build is delayed by overtiming running build
Method Detail

getTimeInterval

@Nullable
public TimeInterval getTimeInterval()
Returns:
the time interval describing the estimated lifetime of the build. null means the times are unknown.

getAgent

@Nullable
public BuildAgent getAgent()
Returns:
the agent the build is supposed to run on. null means unknown.

getWaitReason

@Nullable
public WaitReason getWaitReason()
There is one obvious reason for not running a build -- there's no available agents. However a build may not start even if there are compatible idle agents. It may happen when starting this build would violate some constraint. For example, the maximum number of running builds of the corresponding build configuration. If such a special reason is taking place, the method returns a descriptive object for it. Otherwise it return null.

Returns:
a descriptive object for a special wait reason. Null if there's no special reason for not running the build.

isDelayed

public boolean isDelayed()