Package com.qfs.pool
Class ATasksPerNumaNode
java.lang.Object
com.qfs.pool.ATasksPerNumaNode
- Direct Known Subclasses:
TasksPerNumaNode
A
CancellableCountedCompleter for components that can collect tasks to bind on NUMA
nodes, and then run them all.- Author:
- ActiveViam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ATasksPerNumaNodeAdds the given action, binding it to the given NUMA node.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.merge(ATasksPerNumaNode tasksToMerge) Merges all the given tasks inside this set of tasks, preserving the binding (NUMA node -> set of tasks) unchanged.
-
Constructor Details
-
ATasksPerNumaNode
public ATasksPerNumaNode()
-
-
Method Details
-
merge
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
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
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
Adds the given action, binding it to thedefaultNUMA node.- Parameters:
runnable- the action to run- Returns:
- this instance, with the new
Runnable
-
forEachTask
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
-