Class 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
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CleanUpTask

        public CleanUpTask​(Run<?,​?> masterId,
                           CleanUpCallable cleanUpCallable,
                           Launcher launcher)
        Creates and enqueues an clean up taks that will be executed when calling cleanUp(Run, TptLogger)
        Parameters:
        masterId - abstract build as id
        cleanUpCallable - the callable to execute for clean up
        launcher - 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 removed
        logger - for dumping error messages
        Returns:
        true if it was possible to execute the tasks.
        Throws:
        java.lang.InterruptedException - If thread was interrupted