Class TriggerStore
- java.lang.Object
-
- hudson.model.Descriptor<TriggerStore>
-
- org.jenkinsci.plugins.registry.notification.TriggerStore
-
- All Implemented Interfaces:
Describable<TriggerStore>
,Saveable
,OnMaster
@Extension public final class TriggerStore extends Descriptor<TriggerStore> implements Describable<TriggerStore>
Store of all triggered builds.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TriggerStore.ItemListener
static class
TriggerStore.TriggerEntry
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description TriggerStore()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TriggerStore.TriggerEntry
finalized(PushNotification pushNotification, Run<?,?> run)
Descriptor<TriggerStore>
getDescriptor()
TriggerStore.TriggerEntry
getEntry(String sha)
Gets an existingTriggerStore.TriggerEntry
, or null if no such thing exists.static TriggerStore
getInstance()
Gets the effective singleton instance.void
removed(PushNotification payload, Run<?,?> run)
When a build has been removed from jenkins it should also be removed from this store.void
save(TriggerStore.TriggerEntry entry)
void
started(PushNotification pushNotification, Run<?,?> run)
void
triggered(PushNotification pushNotification, Job<?,?> job)
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
triggered
public void triggered(@NonNull PushNotification pushNotification, Job<?,?> job)
-
started
public void started(@NonNull PushNotification pushNotification, Run<?,?> run)
-
finalized
@CheckForNull public TriggerStore.TriggerEntry finalized(@NonNull PushNotification pushNotification, Run<?,?> run)
-
removed
public void removed(@NonNull PushNotification payload, Run<?,?> run)
When a build has been removed from jenkins it should also be removed from this store.- Parameters:
payload
- the payloadrun
- the build.
-
getEntry
@CheckForNull public TriggerStore.TriggerEntry getEntry(String sha) throws IOException, InterruptedException
Gets an existingTriggerStore.TriggerEntry
, or null if no such thing exists.- Parameters:
sha
- thePushNotification.sha()
.- Returns:
- the entry if found.
- Throws:
IOException
- if soInterruptedException
- if so
-
save
public void save(@NonNull TriggerStore.TriggerEntry entry) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getInstance
@NonNull public static TriggerStore getInstance()
Gets the effective singleton instance.- Returns:
- the effective singleton instance.
- Throws:
AssertionError
- if the singleton is missing, i.e. not running on a Jenkins master.
-
getDescriptor
public Descriptor<TriggerStore> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<TriggerStore>
-
-