Package hudson.util
Class DoubleLaunchChecker
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.AdministrativeMonitor
hudson.util.DoubleLaunchChecker
- All Implemented Interfaces:
- ExtensionPoint,- ModelObject,- SearchableModelObject,- SearchItem,- org.kohsuke.stapler.StaplerProxy
Makes sure that no other Hudson uses our 
JENKINS_HOME directory,
 to forestall the problem of running multiple instances of Hudson that point to the same data directory.
 This set up error occasionally happens especially when the user is trying to reassign the context path of the app, and it results in a hard-to-diagnose error, so we actively check this.
The mechanism is simple. This class occasionally updates a known file inside the hudson home directory, and whenever it does so, it monitors the timestamp of the file to make sure no one else is updating this file. In this way, while we cannot detect the problem right away, within a reasonable time frame we can detect the collision.
- Since:
- 1.178
- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Field SummaryFieldsFields inherited from class hudson.model.AdministrativeMonitorid
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class hudson.model.AdministrativeMonitorall, checkRequiredPermission, disable, doDisable, getRequiredPermission, getSearchUrl, getTarget, getUrl, hasPermissionToDisplay, hasRequiredPermission, isActivationFake, isEnabled, isSecurityMethods inherited from class hudson.model.AbstractModelObjectgetSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItemgetSearchGroup, getSearchIcon
- 
Field Details- 
home
 
- 
- 
Constructor Details- 
DoubleLaunchCheckerpublic DoubleLaunchChecker()
 
- 
- 
Method Details- 
getDisplayName- Specified by:
- getDisplayNamein interface- ModelObject
- Overrides:
- getDisplayNamein class- AdministrativeMonitor
 
- 
isActivatedpublic boolean isActivated()Description copied from class:AdministrativeMonitorReturns true if this monitor is activated and wants to produce a warning message.This method is called from the HTML rendering thread, so it should run efficiently. - Specified by:
- isActivatedin class- AdministrativeMonitor
 
- 
executeprotected void execute()
- 
getIdFigures out a string that identifies this instance of Hudson.
- 
getCollidingId
 
-