Class ThreadManagerForkJoin.FJThreadFactory

java.lang.Object
org.jppf.execute.ThreadManagerForkJoin.FJThreadFactory
All Implemented Interfaces:
ForkJoinPool.ForkJoinWorkerThreadFactory
Enclosing class:
ThreadManagerForkJoin

protected class ThreadManagerForkJoin.FJThreadFactory extends Object implements ForkJoinPool.ForkJoinWorkerThreadFactory
  • Constructor Details

    • FJThreadFactory

      public FJThreadFactory(String name)
      Initialize this thread factory with the specified name.
      Parameters:
      name - the name used as prefix for the constructed threads name.
    • FJThreadFactory

      public FJThreadFactory(String name, int priority)
      Initialize this thread factory with the specified name.
      Parameters:
      name - the name used as prefix for the constructed threads name.
      priority - priority assigned to the threads created by this factory.
    • FJThreadFactory

      public FJThreadFactory(String name, boolean monitoringEnabled)
      Initialize this thread factory with the specified name.
      Parameters:
      name - the name used as prefix for the constructed threads name.
      monitoringEnabled - determines whether the threads created by this factory can be monitored.
    • FJThreadFactory

      public FJThreadFactory(String name, boolean monitoringEnabled, int priority)
      Initialize this thread factory with the specified name.
      Parameters:
      name - the name used as prefix for the constructed threads name.
      monitoringEnabled - determines whether the threads created by this factory can be monitored.
      priority - priority assigned to the threads created by this factory.
  • Method Details

    • newThread

      public ForkJoinWorkerThread newThread(ForkJoinPool pool)
      Specified by:
      newThread in interface ForkJoinPool.ForkJoinWorkerThreadFactory
    • terminate

      protected void terminate(Thread thread, Throwable exception)
      Process terminated thread that is no longer used by fork join pool.
      Parameters:
      thread - the thread instance.
      exception - the exception of unrecoverable error or null
    • getThreadIDs

      public long[] getThreadIDs()
      Get the ids of the monitored threads.
      Returns:
      a list of long values.
    • setPriority

      public void setPriority(int priority)
      Update the priority of all threads created by this factory.
      Parameters:
      priority - the new priority to set.
    • getPriority

      public int getPriority()
      Get the priority assigned to the threads created by this factory.
      Returns:
      the priority as an int value.
    • getTerminatedInfo

      public ExecutionInfo getTerminatedInfo()
      Get the summary information for all terminated threads.
      Returns:
      a NodeExecutionInfo instance.
    • useClassLoader

      public ThreadManager.UsedClassLoader useClassLoader(ClassLoader classLoader)
      Use class loader in this thread manager.
      Parameters:
      classLoader - a ClassLoader instance.
      Returns:
      a UsedClassLoader instance. Never return null.
    • dispose

      protected void dispose(org.jppf.execute.ThreadManagerForkJoin.FJUsedClassLoader usedClassLoader)
      Disposes used class loaderer from this thread factory.
      Parameters:
      usedClassLoader - a FJUsedClassLoader instance.