org.jenkinsci.plugins.pretestedintegration
Class BuildQueue

java.lang.Object
  extended by org.jenkinsci.plugins.pretestedintegration.BuildQueue

public final class BuildQueue
extends Object


Method Summary
 boolean available()
          Test if the lock is available, without blocking.
 void enqueueAndWait()
          Block until the commit can be tested without any other commits running at the same time.
static BuildQueue getInstance()
          Get the singleton instance.
 void release()
          Signal that the build is done and a new one can get access.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BuildQueue getInstance()
Get the singleton instance.


enqueueAndWait

public void enqueueAndWait()
Block until the commit can be tested without any other commits running at the same time. After calling this function, release() MUST be called, so make sure that every error scenario releases the lock at some point.


release

public void release()
Signal that the build is done and a new one can get access.


available

public boolean available()
Test if the lock is available, without blocking.

Returns:
boolean indicating if the queue is not occupied


Copyright © 2004-2014. All Rights Reserved.