Package com.piketec.jenkins.plugins.tpt
Class CleanUpTask
- java.lang.Object
-
- com.piketec.jenkins.plugins.tpt.CleanUpTask
-
public class CleanUpTask extends java.lang.Object
Task to execute after executing a builder. Usually done in a finally block- Author:
- jkuhnert, PikeTec GmbH
-
-
Constructor Summary
Constructors Constructor Description CleanUpTask(Run<?,?> masterId, CleanUpCallable cleanUpCallable, Launcher launcher)
Creates and enqueues an clean up taks that will be executed when callingcleanUp(Run, TptLogger)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
cleanUp(Run<?,?> masterId, TptLogger logger)
removes and executes a list of CleanUpTask from the registry
-
-
-
Constructor Detail
-
CleanUpTask
public CleanUpTask(Run<?,?> masterId, CleanUpCallable cleanUpCallable, Launcher launcher)
Creates and enqueues an clean up taks that will be executed when callingcleanUp(Run, TptLogger)
- Parameters:
masterId
- abstract build as idcleanUpCallable
- the callable to execute for clean uplauncher
- the launcher
-
-
Method Detail
-
cleanUp
public static boolean cleanUp(Run<?,?> masterId, TptLogger logger) throws java.lang.InterruptedException
removes and executes a list of CleanUpTask from the registry- Parameters:
masterId
- to identify to which registry the task is going to be removedlogger
- for dumping error messages- Returns:
- true if it was possible to execute the tasks.
- Throws:
java.lang.InterruptedException
- If thread was interrupted
-
-