All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ee.telekom.workflow.util.ExecutorServiceUtil Maven / Gradle / Ivy

Go to download

Telekom-workflow-engine core provides the runtime environment for workflow execution together with all the supporting services (clustering, persistence, error handling etc).

There is a newer version: 1.6.3
Show newest version
package ee.telekom.workflow.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;

public class ExecutorServiceUtil{

    public static void shutDownSynchronously( ExecutorService executorService ){
        if( executorService != null ){
            executorService.shutdown();
            while( !executorService.isTerminated() ){
                try{
                    executorService.awaitTermination( 1, TimeUnit.MINUTES );
                }
                catch( InterruptedException e ){
                    // Do not return on interrupts, but wait until all submitted tasks are completed.
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy