Interface PinnedThreadFactory

  • All Superinterfaces:
    java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory, java.util.concurrent.ThreadFactory
    All Known Implementing Classes:
    FixedAffinityPinnedThreadFactory, GovernedAffinityPinnedThreadFactory

    public interface PinnedThreadFactory
    extends java.util.concurrent.ThreadFactory, java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.sheinbergon.needle.PinnedThread newThread​(java.lang.Runnable r)
      Constructs a new PinnedThread.
      org.sheinbergon.needle.PinnedThread.ForkJoinWorker newThread​(java.util.concurrent.ForkJoinPool pool)  
    • Method Detail

      • newThread

        @Nullable
        org.sheinbergon.needle.PinnedThread newThread​(@Nonnull
                                                      java.lang.Runnable r)
        Constructs a new PinnedThread.
        Specified by:
        newThread in interface java.util.concurrent.ThreadFactory
        Parameters:
        r - a runnable to be executed by new thread instance
        Returns:
        instantiated PinnedThread, or null if the request to create a thread is rejected
      • newThread

        @Nullable
        org.sheinbergon.needle.PinnedThread.ForkJoinWorker newThread​(@Nonnull
                                                                     java.util.concurrent.ForkJoinPool pool)
        Specified by:
        newThread in interface java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory
        Parameters:
        pool - the pool this pinned worker thread operates in
        Returns:
        the pinned worker thread, or null if the implementation rejects its inception