~ubuntu-branches/ubuntu/trusty/jenkins/trusty

« back to all changes in this revision

Viewing changes to core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-13 12:35:19 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130813123519-tizgfxcr70trl7r0
Tags: 1.509.2+dfsg-1
* New upstream release (Closes: #706725):
  - d/control: Update versioned BD's:
    * jenkins-executable-war >= 1.28.
    * jenkins-instance-identity >= 1.3.
    * libjenkins-remoting-java >= 2.23.
    * libjenkins-winstone-java >= 0.9.10-jenkins-44.
    * libstapler-java >= 1.207.
    * libjenkins-json-java >= 2.4-jenkins-1.
    * libstapler-adjunct-timeline-java >= 1.4.
    * libstapler-adjunct-codemirror-java >= 1.2.
    * libmaven-hpi-plugin-java >= 1.93.
    * libjenkins-xstream-java >= 1.4.4-jenkins-3.
  - d/maven.rules: Map to older version of animal-sniffer-maven-plugin.
  - Add patch for compatibility with guava >= 0.14.
  - Add patch to exclude asm4 dependency via jnr-posix.
  - Fixes the following security vulnerabilities:
    CVE-2013-2034, CVE-2013-2033, CVE-2013-2034, CVE-2013-1808
* d/patches/*: Switch to using git patch-queue for managing patches.
* De-duplicate jars between libjenkins-java and jenkins-external-job-monitor
  (Closes: #701163):
  - d/control: Add dependency between jenkins-external-job-monitor ->
    libjenkins-java.
  - d/rules: 
    Drop installation of jenkins-core in jenkins-external-job-monitor.
  - d/jenkins-external-job-monitor.{links,install}: Link to jenkins-core
    in /usr/share/java instead of included version.
* Wait longer for jenkins to stop during restarts (Closes: #704848):
  - d/jenkins.init: Re-sync init script from upstream codebase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
import java.util.Date;
37
37
import java.util.HashMap;
38
38
import java.util.Map;
 
39
import java.util.Timer;
39
40
import java.util.logging.Level;
40
41
import java.util.logging.Logger;
41
42
 
70
71
    }
71
72
 
72
73
    private void schedule(long interval) {
73
 
        Trigger.timer.scheduleAtFixedRate(new SafeTimerTask() {
74
 
            public void doRun() {
75
 
                triggerUpdate();
76
 
            }
77
 
        }, interval, interval);
 
74
        Timer timer = Trigger.timer;
 
75
        if (timer != null) {
 
76
            timer.scheduleAtFixedRate(new SafeTimerTask() {
 
77
                public void doRun() {
 
78
                    triggerUpdate();
 
79
                }
 
80
            }, interval, interval);
 
81
        }
78
82
    }
79
83
 
80
84
    /**
130
134
    }
131
135
 
132
136
    /**
 
137
     * Utility method to mark the computer online for derived classes.
 
138
     * 
 
139
     * @return true 
 
140
     *      if the node was actually taken online by this act (as opposed to us deciding not to do it,
 
141
     *      or the computer was already online.)
 
142
     */
 
143
    protected boolean markOnline(Computer c) {
 
144
        if(isIgnored() || c.isOnline()) return false; // noop
 
145
        c.setTemporarilyOffline(false,null);
 
146
        return true;
 
147
    }
 
148
    
 
149
    /**
133
150
     * Utility method to mark the computer offline for derived classes.
134
151
     *
135
152
     * @return true