|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent
@ThreadSafe public class DefaultBuildAgent
Constructor Summary | |
---|---|
DefaultBuildAgent(BuildAgentController buildAgentController,
long agentId,
java.lang.String agentName)
|
Method Summary | |
---|---|
void |
build(BuildContext newBuildContext,
ReadOnlyCapabilitySet agentCapabilities)
Executes the passed BuildContext |
void |
cancelBuild(java.lang.String buildResultKey)
Cancels the passed buildResultKey if it matches |
int |
compareTo(BuildAgent o)
|
void |
disable()
|
void |
enable()
|
boolean |
equals(java.lang.Object o)
|
AgentStatus |
getAgentStatus()
|
BuildContext |
getBuilding()
Gets the BuildContext related to the build that is building on the agent. |
long |
getId()
Agent id |
java.lang.String |
getName()
Agent name |
int |
hashCode()
|
int |
incrementError()
Tells the agent that an unhandled error has occurred. |
boolean |
isActive()
|
boolean |
isCancelling()
|
boolean |
isEnabled()
|
boolean |
isStopping()
|
void |
onBuildProcessingFinished()
This method is called when the build process is completed and the result processing has finished. |
void |
resetErrors()
Resetes the error count |
void |
start()
Starts the build agent |
void |
stop()
Stops the build agent immedaitely. |
void |
stopNicely()
Attempt to stop the agent and wait for the current build (if any) to stop building |
void |
waitForStop(int secondsToWait)
Waits a certain number of seconds for a build to stop. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultBuildAgent(BuildAgentController buildAgentController, long agentId, java.lang.String agentName)
Method Detail |
---|
public long getId()
ExecutableBuildAgent
getId
in interface ExecutableBuildAgent
public java.lang.String getName()
ExecutableBuildAgent
getName
in interface ExecutableBuildAgent
public void start()
ExecutableBuildAgent
start
in interface ExecutableBuildAgent
public void build(@NotNull BuildContext newBuildContext, @NotNull ReadOnlyCapabilitySet agentCapabilities) throws java.lang.Exception
ExecutableBuildAgent
BuildContext
build
in interface ExecutableBuildAgent
java.lang.Exception
public void onBuildProcessingFinished()
ExecutableBuildAgent
onBuildProcessingFinished
in interface ExecutableBuildAgent
public void cancelBuild(@NotNull java.lang.String buildResultKey)
ExecutableBuildAgent
cancelBuild
in interface ExecutableBuildAgent
public void waitForStop(int secondsToWait) throws java.util.concurrent.TimeoutException
ExecutableBuildAgent
waitForStop
in interface ExecutableBuildAgent
secondsToWait
- -
java.util.concurrent.TimeoutException
public int incrementError()
ExecutableBuildAgent
incrementError
in interface ExecutableBuildAgent
public void resetErrors()
ExecutableBuildAgent
resetErrors
in interface ExecutableBuildAgent
public boolean isCancelling()
public void stop()
ExecutableBuildAgent
stop
in interface ExecutableBuildAgent
public void stopNicely()
ExecutableBuildAgent
stopNicely
in interface ExecutableBuildAgent
public BuildContext getBuilding()
ExecutableBuildAgent
BuildContext
related to the build that is building on the agent. Null if not building or
cancelling anything.
getBuilding
in interface ExecutableBuildAgent
public void enable()
public void disable()
public boolean isEnabled()
public AgentStatus getAgentStatus()
getAgentStatus
in interface ExecutableBuildAgent
public boolean isStopping()
public boolean isActive()
isActive
in interface ExecutableBuildAgent
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(BuildAgent o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |