public class AgentQueueAccessorImpl extends Object implements AgentQueueAccessor
AgentQueueAccessor.QueueAccessResult
Constructor and Description |
---|
AgentQueueAccessorImpl() |
Modifier and Type | Method and Description |
---|---|
@Nullable CommonContext |
takeBuildContext(long id)
Takes a
CommonContext from the queue, blocking until one is available. |
AgentQueueAccessor.QueueAccessResult |
takeContext(long agentId)
Takes a
CommonContext from the queue, blocking until one is available. |
@Nullable public @Nullable CommonContext takeBuildContext(long id) throws InterruptedException
AgentQueueAccessor
CommonContext
from the queue, blocking until one is available.
The lock on the build is not released. The caller should call com.atlassian.bamboo.build.BuildExecutionManager#finishBuild(PlanResultKey)
to
release this lock when ready.
takeBuildContext
in interface AgentQueueAccessor
id
- the id of the agent that is taking the build context.CommonContext
, null in case of timeout on retrieval.InterruptedException
- if the calling Thread
is interrupted.public AgentQueueAccessor.QueueAccessResult takeContext(long agentId) throws InterruptedException
AgentQueueAccessor
CommonContext
from the queue, blocking until one is available.
The lock on the build is not released. The caller should call com.atlassian.bamboo.build.BuildExecutionManager#finishBuild(PlanResultKey)
to
release this lock when ready.
takeContext
in interface AgentQueueAccessor
agentId
- the id of the agent that is taking the build context.AgentQueueAccessor.QueueAccessResult
containing: CommonContext
on success, error message on error, nulls in case of timeout on retrieval.InterruptedException
- if the calling Thread
is interrupted.Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.