Package com.qfs.pool
Class ATasksPerNumaNode
- java.lang.Object
-
- com.qfs.pool.ATasksPerNumaNode
-
- Direct Known Subclasses:
TasksPerNumaNode
public abstract class ATasksPerNumaNode extends Object
ACancellableCountedCompleterfor components that can collect tasks to bind on NUMA nodes, and then run them all.- Author:
- ActiveViam
-
-
Constructor Summary
Constructors Constructor Description ATasksPerNumaNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ATasksPerNumaNodeadd(int numaNode, Runnable runnable)Adds the given action, binding it to the given NUMA node.ATasksPerNumaNodeadd(Runnable runnable)Adds the given action, binding it to thedefaultNUMA node.abstract voidforEachTask(BiConsumer<Integer,Runnable> consumer)Iterates over all the registered tasks.abstract ATasksPerNumaNodemerge(int defaultNumaNode, ATasksPerNumaNode toMerge)Merges all the given tasks inside this set of tasks, preserving the binding (NUMA node -> set of tasks) unchanged.ATasksPerNumaNodemerge(ATasksPerNumaNode tasksToMerge)Merges all the given tasks inside this set of tasks, preserving the binding (NUMA node -> set of tasks) unchanged.
-
-
-
Method Detail
-
merge
public abstract ATasksPerNumaNode merge(int defaultNumaNode, ATasksPerNumaNode toMerge)
Merges all the given tasks inside this set of tasks, preserving the binding (NUMA node -> set of tasks) unchanged.- Parameters:
defaultNumaNode- the NUMA node on which to run all the merged tasks tagged withWHATEVER_NUMA_NODEtoMerge- theATasksPerNumaNodeto merge intothisone- Returns:
thisinstance, with the contribution of the giventoMerge
-
merge
public ATasksPerNumaNode merge(ATasksPerNumaNode tasksToMerge)
Merges all the given tasks inside this set of tasks, preserving the binding (NUMA node -> set of tasks) unchanged.- Parameters:
tasksToMerge- theATasksPerNumaNodeto merge intothisone- Returns:
thisinstance, with the contribution of the giventoMerge
-
add
public abstract ATasksPerNumaNode add(int numaNode, Runnable runnable)
Adds the given action, binding it to the given NUMA node.- Parameters:
numaNode- the ID of the thread pool in which to run the compression action, orWHATEVER_NUMA_NODEif it doesn't matterrunnable- the action to run- Returns:
- this instance, with the new
Runnable
-
add
public ATasksPerNumaNode add(Runnable runnable)
Adds the given action, binding it to thedefaultNUMA node.- Parameters:
runnable- the action to run- Returns:
- this instance, with the new
Runnable
-
forEachTask
public abstract void forEachTask(BiConsumer<Integer,Runnable> consumer)
Iterates over all the registered tasks.- Parameters:
consumer- aBiConsumerthat will be called for each registered task, along with the NUMA node ID it is bound to
-
-