Package me.saro.kit

Class Threads

java.lang.Object
me.saro.kit.Threads

public class Threads
extends java.lang.Object
thread util
Since:
1.0.0
Author:
PARK Yong Seo
  • Constructor Summary

    Constructors 
    Constructor Description
    Threads()  
  • Method Summary

    Modifier and Type Method Description
    static <T,​ R> java.util.List<R> executeAllThreads​(int nThreads, java.util.List<T> list, ThrowableFunction<T,​R> map)
    execute all threads
    static <T,​ R> java.util.List<R> executeAllThreads​(java.util.concurrent.ExecutorService executorService, java.util.List<T> list, ThrowableFunction<T,​R> map)
    execute all threads WARNING : this method does not shutdown to ExecutorService instance
    static void kill​(java.lang.Thread thread)
    kill thread without exception

    Methods inherited from class java.lang.Object

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

  • Method Details

    • executeAllThreads

      public static <T,​ R> java.util.List<R> executeAllThreads​(java.util.concurrent.ExecutorService executorService, java.util.List<T> list, ThrowableFunction<T,​R> map)
      execute all threads WARNING : this method does not shutdown to ExecutorService instance
      Parameters:
      executorService -
      list -
      map -
      Returns:
      map result list
    • executeAllThreads

      public static <T,​ R> java.util.List<R> executeAllThreads​(int nThreads, java.util.List<T> list, ThrowableFunction<T,​R> map)
      execute all threads
      Parameters:
      nThreads -
      list -
      map -
      Returns:
      map result list
    • kill

      public static void kill​(java.lang.Thread thread)
      kill thread without exception
      Parameters:
      thread -