com.atlassian.bamboo.v2.build.queue
Class AgentQueueAccessorImpl

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.queue.AgentQueueAccessorImpl
All Implemented Interfaces:
AgentQueueAccessor

public class AgentQueueAccessorImpl
extends Object
implements AgentQueueAccessor

An instance of this class is shared between multiple local agents


Constructor Summary
AgentQueueAccessorImpl()
           
 
Method Summary
 CommonContext takeBuildContext(long id)
          Takes a BuildContext from the queue, blocking until one is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentQueueAccessorImpl

public AgentQueueAccessorImpl()
Method Detail

takeBuildContext

@Nullable
public CommonContext takeBuildContext(long id)
                               throws InterruptedException
Description copied from interface: AgentQueueAccessor
Takes a BuildContext from the queue, blocking until one is available.

The lock on the build is not released. The caller should call BuildExecutionManager#finishProcess to release this lock when ready.

Specified by:
takeBuildContext in interface AgentQueueAccessor
Returns:
The BuildContext, null in case of timeout on retrieval.
Throws:
InterruptedException - if the calling Thread is interrupted.


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.