public String getIconAltText() { if(isOffline()) return "[offline]"; else return "[online]"; }
public final boolean isOnline() { return !isOffline(); }
public void waitUntilOffline() throws InterruptedException { synchronized (statusChangeLock) { while (!isOffline()) statusChangeLock.wait(1000); } }
/** * Returns the icon for this computer. * * It is both the recommended and default implementation to serve different icons based on {@link #isOffline} * * @see #getIconClassName() */ @Exported public String getIcon() { if(isOffline()) return "computer-x.png"; else return "computer.png"; }
/** * Returns the class name that will be used to lookup the icon. * * This class name will be added as a class tag to the html img tags where the icon should * show up followed by a size specifier given by {@link Icon#toNormalizedIconSizeClass(String)} * The conversion of class tag to src tag is registered through {@link IconSet#addIcon(Icon)} * * It is both the recommended and default implementation to serve different icons based on {@link #isOffline} * * @see #getIcon() */ @Exported public String getIconClassName() { if(isOffline()) return "icon-computer-x"; else return "icon-computer"; }
/** * Returns true if all the nodes of this label is offline. */ @Exported public boolean isOffline() { for (Node n : getNodes()) { Computer c = n.toComputer(); if(c != null && !c.isOffline()) return false; } return true; }
/** * Is this executor ready to accept some tasks? */ public boolean isAvailable() { return workUnit == null && !executor.getOwner().isOffline() && executor.getOwner().isAcceptingTasks(); }
@Override public Object data(Computer c) { DiskSpace size = markNodeOfflineIfDiskspaceIsTooLow(c); // mark online (again), if free space is over threshold if(size!=null && size.size > getThresholdBytes() && c.isOffline() && c.getOfflineCause() instanceof DiskSpace) if(this.getClass().equals(((DiskSpace)c.getOfflineCause()).getTrigger())) if(getDescriptor().markOnline(c)) { LOGGER.info(Messages.DiskSpaceMonitor_MarkedOnline(c.getName())); } return size; }
if (c.isOffline()) continue; for (Executor e : c.getExecutors()) { slots.add(new PseudoExecutorSlot(e));
for (Node n : hash.list(fullDisplayName)) { final Computer c = n.toComputer(); if (c == null || c.isOffline()) { continue;
return CauseOfBlockage.fromMessage(Messages._Queue_executor_slot_already_in_use()); if (executor.getOwner().isOffline()) { return new CauseOfBlockage.BecauseNodeIsOffline(node);
public String getIconAltText() { if(isOffline()) return "[offline]"; else return "[online]"; }
public String getIconAltText() { if(isOffline()) return "[offline]"; else return "[online]"; }
@Exported public String getIcon() { if(isOffline()) return "computer-x.png"; else return "computer.png"; }
@Exported public String getIcon() { if (isOffline()) { return "computer-x.png"; } else { return "computer.png"; } }
/** * Is this executor ready to accept some tasks? */ @Override public boolean isAvailable() { return workUnit == null && !executor.getOwner().isOffline() && executor.getOwner().isAcceptingTasks(); }
/** * Is this executor ready to accept some tasks? */ public boolean isAvailable() { return workUnit == null && !executor.getOwner().isOffline() && executor.getOwner().isAcceptingTasks(); }
/** * Is this executor ready to accept some tasks? */ public boolean isAvailable() { return workUnit == null && !executor.getOwner().isOffline() && executor.getOwner().isAcceptingTasks(); }
/** * Returns true if all the nodes of this label is offline. */ @Exported public boolean isOffline() { for (Node n : getNodes()) { if(n.toComputer() != null && !n.toComputer().isOffline()) return false; } return true; }
/** * Returns true if all the nodes of this label is offline. */ @Exported public boolean isOffline() { for (Node n : getNodes()) { if(n.toComputer() != null && !n.toComputer().isOffline()) return false; } return true; }