public class SlotSharingManager extends Object
The SlotSharingManager allows to create a hierarchy of
SlotSharingManager.TaskSlot such that
SlotSharingManager.TaskSlot is uniquely identified by a
the request for the TaskSlot and a
AbstractID identifying the task or the
co-location constraint running in this slot.
SlotSharingManager.TaskSlot hierarchy is implemented by
SlotSharingManager.SingleTaskSlot. The former class represents inner nodes which can contain
a number of other
SlotSharingManager.TaskSlot and the latter class represents the leaf nodes.
The hierarchy starts with a root
SlotSharingManager.MultiTaskSlot which is a future
SlotContext assigned. The
SlotContext represents the allocated slot
on the TaskExecutor in which all slots of this hierarchy run. A
can be assigned multiple
SlotSharingManager.MultiTaskSlot if and only if
the task slot does not yet contain another child with the same
the actual task or the co-location constraint.
Normal slot sharing is represented by a root
SlotSharingManager.MultiTaskSlot which contains a set
SlotSharingManager.SingleTaskSlot on the second layer. Each
SlotSharingManager.SingleTaskSlot represents a different
Co-location constraints are modeled by adding a
SlotSharingManager.MultiTaskSlot to the root node. The co-location
constraint is uniquely identified by a
AbstractID such that we cannot add a second co-located
SlotSharingManager.MultiTaskSlot to the same root node. Now all co-located tasks will be added to co-located
multi task slot.
|Modifier and Type||Class and Description|
Base class for all task slots.
|Modifier and Type||Method and Description|
Returns a collection of all resolved root slots.
public boolean isEmpty()
public boolean contains(SlotRequestId slotRequestId)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.