Class QueueManagerView<S extends CommonContext,V>
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.queue.QueueManagerView<S,V>
-
public class QueueManagerView<S extends CommonContext,V> extends Object
QueueManagerView is the only class that should be used to access Bamboo queue. The idea behind it is that the client code will store a subset of data from the build queue a 'queue view' and every time it needs new data, it will supply the previous view. In this way, the amount of data stored in memory will be reduced - Bamboo will no longer have to keep all data of all builds in memory. To use it, instantiate a view vianewBuildView(BuildQueueManager, com.google.common.base.Function)
ornewBuildView(BuildQueueManager, com.google.common.base.Function)
, store the reference and usegetQueueView(Iterable)
to get the data you need. Store the view reference for later use (you probably want to use a volatile variable for it.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<BuildQueueManager.QueueItemView<V>>
getQueueView(Iterable<BuildQueueManager.QueueItemView<V>> previouslyQueuedExecutables)
static <V> QueueManagerView<BuildContext,V>
newBuildView(BuildQueueManager buildQueueManager, com.google.common.base.Function<BuildQueueManager.QueueItemView<BuildContext>,BuildQueueManager.QueueItemView<V>> viewMapper)
Convenience method that returns a view with builds (not deployments).static <V> QueueManagerView<CommonContext,V>
newView(BuildQueueManager buildQueueManager, com.google.common.base.Function<BuildQueueManager.QueueItemView<CommonContext>,BuildQueueManager.QueueItemView<V>> context2QueueItem)
Creates a queue view that returns all queued executables - without filtering
-
-
-
Method Detail
-
newBuildView
public static <V> QueueManagerView<BuildContext,V> newBuildView(BuildQueueManager buildQueueManager, com.google.common.base.Function<BuildQueueManager.QueueItemView<BuildContext>,BuildQueueManager.QueueItemView<V>> viewMapper)
Convenience method that returns a view with builds (not deployments).
-
newView
public static <V> QueueManagerView<CommonContext,V> newView(BuildQueueManager buildQueueManager, com.google.common.base.Function<BuildQueueManager.QueueItemView<CommonContext>,BuildQueueManager.QueueItemView<V>> context2QueueItem)
Creates a queue view that returns all queued executables - without filtering
-
getQueueView
public Iterable<BuildQueueManager.QueueItemView<V>> getQueueView(Iterable<BuildQueueManager.QueueItemView<V>> previouslyQueuedExecutables)
-
-