hudson.triggers
Class SCMTrigger.DescriptorImpl

java.lang.Object
  extended by hudson.model.Descriptor<Trigger<?>>
      extended by hudson.triggers.TriggerDescriptor
          extended by hudson.triggers.SCMTrigger.DescriptorImpl
All Implemented Interfaces:
Saveable
Enclosing class:
SCMTrigger

@Extension
public static class SCMTrigger.DescriptorImpl
extends TriggerDescriptor


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
 
Field Summary
 boolean synchronousPolling
          Whether the projects should be polled all in one go in the order of dependencies.
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
SCMTrigger.DescriptorImpl()
           
 
Method Summary
 void clogCheck()
          Checks if the queue is clogged, and if so, activate SCMTrigger.AdministrativeMonitorImpl.
 boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
          Invoked when the global configuration page is submitted.
 FormValidation doCheckPollingThreadCount(String value)
           
 String getDisplayName()
          Human readable name of this kind of configurable object.
 ExecutorService getExecutor()
           
 List<SCMedItem> getItemsBeingPolled()
          Gets the snapshot of SCMedItems that are being polled at this very moment.
 int getPollingThreadCount()
          Gets the number of concurrent threads used for polling.
 List<SCMTrigger.Runner> getRunners()
          Gets the snapshot of SCMTrigger.Runners that are performing polling.
 boolean isApplicable(Item item)
          Returns true if this trigger is applicable to the given Item.
 boolean isClogged()
          Returns true if the SCM polling thread queue has too many jobs than it can handle.
 void setPollingThreadCount(int n)
          Sets the number of concurrent threads used for SCM polling and resizes the thread pool accordingly
 
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

synchronousPolling

public boolean synchronousPolling
Whether the projects should be polled all in one go in the order of dependencies. The default behavior is that each project polls for changes independently.

Constructor Detail

SCMTrigger.DescriptorImpl

public SCMTrigger.DescriptorImpl()
Method Detail

isApplicable

public boolean isApplicable(Item item)
Description copied from class: TriggerDescriptor
Returns true if this trigger is applicable to the given Item.

Specified by:
isApplicable in class TriggerDescriptor
Returns:
true to allow user to configure a trigger for this item.

getExecutor

public ExecutorService getExecutor()

isClogged

public boolean isClogged()
Returns true if the SCM polling thread queue has too many jobs than it can handle.


clogCheck

public void clogCheck()
Checks if the queue is clogged, and if so, activate SCMTrigger.AdministrativeMonitorImpl.


getRunners

public List<SCMTrigger.Runner> getRunners()
Gets the snapshot of SCMTrigger.Runners that are performing polling.


getItemsBeingPolled

public List<SCMedItem> getItemsBeingPolled()
Gets the snapshot of SCMedItems that are being polled at this very moment.


getDisplayName

public String getDisplayName()
Description copied from class: Descriptor
Human readable name of this kind of configurable object.

Specified by:
getDisplayName in class Descriptor<Trigger<?>>

getPollingThreadCount

public int getPollingThreadCount()
Gets the number of concurrent threads used for polling.

Returns:
0 if unlimited.

setPollingThreadCount

public void setPollingThreadCount(int n)
Sets the number of concurrent threads used for SCM polling and resizes the thread pool accordingly

Parameters:
n - number of concurrent threads, zero or less means unlimited, maximum is 100

configure

public boolean configure(org.kohsuke.stapler.StaplerRequest req,
                         net.sf.json.JSONObject json)
                  throws Descriptor.FormException
Description copied from class: Descriptor
Invoked when the global configuration page is submitted. Can be overriden to store descriptor-specific information.

Overrides:
configure in class Descriptor<Trigger<?>>
json - The JSON object that captures the configuration data for this Descriptor. See http://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission
Returns:
false to keep the client in the same config page.
Throws:
Descriptor.FormException

doCheckPollingThreadCount

public FormValidation doCheckPollingThreadCount(@QueryParameter
                                                String value)


Copyright © 2004-2013. All Rights Reserved.