/** * Called by the {@link Node} to help determine whether or not it should * take the given task. Individual properties can return a non-null value * here if there is some reason the given task should not be run on its * associated node. By default, this method returns <code>null</code>. * * @since 1.413 */ public CauseOfBlockage canTake(BuildableItem item) { return canTake(item.task); // backward compatible behaviour }
CauseOfBlockage c = prop.canTake(item); if (c!=null) return c;
/** * Called by the {@link Node} to help determine whether or not it should * take the given task. Individual properties can return a non-null value * here if there is some reason the given task should not be run on its * associated node. By default, this method returns <code>null</code>. * * @since 1.413 */ public CauseOfBlockage canTake(BuildableItem item) { return canTake(item.task); // backward compatible behaviour }
public CauseOfBlockage canTake(Queue.BuildableItem item) { return canTake(item.task); // backward compatible behaviour }
public CauseOfBlockage superCanTake(BuildableItem item) { return super.canTake(item); }
public CauseOfBlockage superCanTake(Task task) { return super.canTake(task); }
@Override public CauseOfBlockage canTake(Task task) { initPython(); if (pexec.isImplemented(2)) { return (CauseOfBlockage) pexec.execPython("can_take", task); } else { return super.canTake(task); } }
@Override public CauseOfBlockage canTake(BuildableItem item) { initPython(); if (pexec.isImplemented(3)) { return (CauseOfBlockage) pexec.execPython("can_take", item); } else { return super.canTake(item); } }
public CauseOfBlockage canTake(Queue.BuildableItem item) { Label l = item.getAssignedLabel(); if(l!=null && !l.contains(this)) return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l)); // the task needs to be executed on label that this node doesn't have. if(l==null && getMode()== Mode.EXCLUSIVE) return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName())); // this node is reserved for tasks that are tied to it // Check each NodeProperty to see whether they object to this node // taking the task for (NodeProperty prop: getNodeProperties()) { CauseOfBlockage c = prop.canTake(item); if (c!=null) return c; } // Looks like we can take the task return null; }
/** * Called by the {@link Queue} to determine whether or not this node can * take the given task. The default checks include whether or not this node * is part of the task's assigned label, whether this node is in * {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label, * and whether or not any of this node's {@link NodeProperty}s say that the * task cannot be run. * * @since 1.360 */ public CauseOfBlockage canTake(Task task) { Label l = task.getAssignedLabel(); if(l!=null && !l.contains(this)) return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l)); // the task needs to be executed on label that this node doesn't have. if(l==null && getMode()== Mode.EXCLUSIVE) return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName())); // this node is reserved for tasks that are tied to it // Check each NodeProperty to see whether they object to this node // taking the task for (NodeProperty prop: getNodeProperties()) { CauseOfBlockage c = prop.canTake(task); if (c!=null) return c; } // Looks like we can take the task return null; }
/** * Called by the {@link Queue} to determine whether or not this node can * take the given task. The default checks include whether or not this node * is part of the task's assigned label, whether this node is in * {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label, * and whether or not any of this node's {@link NodeProperty}s say that the * task cannot be run. * * @since 1.360 */ public CauseOfBlockage canTake(Task task) { Label l = task.getAssignedLabel(); if(l!=null && !l.contains(this)) return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l)); // the task needs to be executed on label that this node doesn't have. if(l==null && getMode()== Mode.EXCLUSIVE) return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName())); // this node is reserved for tasks that are tied to it // Check each NodeProperty to see whether they object to this node // taking the task for (NodeProperty prop: getNodeProperties()) { CauseOfBlockage c = prop.canTake(task); if (c!=null) return c; } // Looks like we can take the task return null; }
/** * Called by the {@link Queue} to determine whether or not this node can * take the given task. The default checks include whether or not this node * is part of the task's assigned label, whether this node is in * {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label, * and whether or not any of this node's {@link NodeProperty}s say that the * task cannot be run. * * @since 1.360 */ public CauseOfBlockage canTake(Task task) { Label l = task.getAssignedLabel(); if(l!=null && !l.contains(this)) return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l)); // the task needs to be executed on label that this node doesn't have. if(l==null && getMode()== Mode.EXCLUSIVE) return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName())); // this node is reserved for tasks that are tied to it // Check each NodeProperty to see whether they object to this node // taking the task for (NodeProperty prop: getNodeProperties()) { CauseOfBlockage c = prop.canTake(task); if (c!=null) return c; } // Looks like we can take the task return null; }
CauseOfBlockage c = prop.canTake(item); if (c!=null) return c;