public class ExecutionGraphUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
releaseAllSlotsSilently(List<ExecutionAndSlot[]> resources)
Releases the all the slots in the list of arrays of
ExecutionAndSlot . |
static void |
releaseSlotFuture(Future<SimpleSlot> slotFuture)
Releases the slot represented by the given future.
|
public static void releaseSlotFuture(Future<SimpleSlot> slotFuture)
Note that releasing the slot means cancelling any task execution currently associated with that slot.
slotFuture
- The future for the slot to release.public static void releaseAllSlotsSilently(List<ExecutionAndSlot[]> resources)
ExecutionAndSlot
.
For each future in that collection holds: If the future is complete, its slot is
immediately released. Otherwise, the slot is released as soon as the future
is completed.
This methods never throws any exceptions (except for fatal exceptions) and continues to release the remaining slots if one slot release failed.
Note that releasing the slot means cancelling any task execution currently associated with that slot.
resources
- The collection of ExecutionAndSlot whose slots should be released.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.