Java 类hudson.model.queue.CauseOfBlockage 实例源码

项目:gearman-plugin    文件:GearmanProxy.java   
public CauseOfBlockage canTake(Node node,
                               Queue.BuildableItem item) {
    // Ask the AvailabilityMonitor for this node if it's okay to
    // run this build.
    ExecutorWorkerThread workerThread = null;

    synchronized(gewtHandles) {
        Computer computer = node.toComputer();
        for (ExecutorWorkerThread t : gewtHandles) {
            if (t.getComputer() == computer) {
                workerThread = t;
                break;
            }
        }
    }

    if (workerThread != null) {
        if (workerThread.getAvailability().canTake(item)) {
            return null;
        } else {
            return new CauseOfBlockage.BecauseNodeIsBusy(node);
        }
    }
    return null;
}
项目:yet-another-docker-plugin    文件:DockerSlave.java   
@Override
public CauseOfBlockage canTake(Queue.BuildableItem item) {
    // hack for some core issue
    if (item.task instanceof Queue.FlyweightTask) {
        return new FlyweightCauseOfBlockage();
    }
    return super.canTake(item);
}
项目:deployer-framework-plugin    文件:DeployNowSlave.java   
@Override
public CauseOfBlockage canTake(Queue.BuildableItem item) {
    if (item.task instanceof DeployNowTask) {
        return null;
    }
    return CauseOfBlockage.fromMessage(Messages._DeployNowSlave_OnlyAcceptsDeployNowTasks());
}
项目:deployer-framework-plugin    文件:DeployNowTask.java   
public CauseOfBlockage getCauseOfBlockage() {
    if (System.currentTimeMillis() > nextCheckForNode) {
        nextCheckForNode = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(60);
        Computer.threadPoolForRemoting.submit(new Runnable() {
            public void run() {
                DeployNowSlave.ensurePresent();
            }
        });
    }
    return null;
}
项目:jenkins.py    文件:NodePropertyPW.java   
@Override
public CauseOfBlockage canTake(Task task) {
    initPython();
    if (pexec.isImplemented(2)) {
        return (CauseOfBlockage) pexec.execPython("can_take", task);
    } else {
        return super.canTake(task);
    }
}
项目:jenkins.py    文件:NodePropertyPW.java   
@Override
public CauseOfBlockage canTake(BuildableItem item) {
    initPython();
    if (pexec.isImplemented(3)) {
        return (CauseOfBlockage) pexec.execPython("can_take", item);
    } else {
        return super.canTake(item);
    }
}
项目:jenkins.py    文件:NodePW.java   
@Override
public CauseOfBlockage canTake(Task task) {
    initPython();
    if (pexec.isImplemented(7)) {
        return (CauseOfBlockage) pexec.execPython("can_take", task);
    } else {
        return super.canTake(task);
    }
}
项目:jenkins.py    文件:NodePW.java   
@Override
public CauseOfBlockage canTake(Queue.BuildableItem item) {
    initPython();
    if (pexec.isImplemented(8)) {
        return (CauseOfBlockage) pexec.execPython("can_take", item);
    } else {
        return super.canTake(item);
    }
}
项目:gearman-plugin    文件:QueueTaskDispatcherImpl.java   
@Override
public CauseOfBlockage canTake(Node node,
                               Queue.BuildableItem item) {
    // update only when gearman-plugin is enabled
    if (!GearmanPluginConfig.get().enablePlugin()) {
        return null;
    }

    return GearmanProxy.getInstance().canTake(node, item);
}
项目:deployer-framework-plugin    文件:DeployNowTask.java   
@Deprecated
public String getWhyBlocked() {
    CauseOfBlockage causeOfBlockage = getCauseOfBlockage();
    return causeOfBlockage == null ? null : causeOfBlockage.getShortDescription();
}
项目:jenkins.py    文件:NodePropertyPW.java   
public CauseOfBlockage superCanTake(Task task) {
    return super.canTake(task);
}
项目:jenkins.py    文件:NodePropertyPW.java   
public CauseOfBlockage superCanTake(BuildableItem item) {
    return super.canTake(item);
}
项目:jenkins.py    文件:NodePW.java   
public CauseOfBlockage superCanTake(Task task) {
    return super.canTake(task);
}
项目:jenkins.py    文件:NodePW.java   
public CauseOfBlockage superCanTake(Queue.BuildableItem item) {
    return super.canTake(item);
}