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.PinnedThreadnewThread(java.lang.Runnable r)Constructs a newPinnedThread.org.sheinbergon.needle.PinnedThread.ForkJoinWorkernewThread(java.util.concurrent.ForkJoinPool pool)
-
-
-
Method Detail
-
newThread
@Nullable org.sheinbergon.needle.PinnedThread newThread(@Nonnull java.lang.Runnable r)Constructs a newPinnedThread.- Specified by:
newThreadin interfacejava.util.concurrent.ThreadFactory- Parameters:
r- a runnable to be executed by new thread instance- Returns:
- instantiated
PinnedThread, ornullif the request to create a thread is rejected
-
newThread
@Nullable org.sheinbergon.needle.PinnedThread.ForkJoinWorker newThread(@Nonnull java.util.concurrent.ForkJoinPool pool)- Specified by:
newThreadin interfacejava.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
-
-