Package jline.api.sn
Class SnSetForkFanoutKt
-
- All Implemented Interfaces:
public final class SnSetForkFanoutKt
-
-
Method Summary
Modifier and Type Method Description final static NetworkStructsnSetForkFanout(NetworkStruct sn, Integer forkNodeIdx, Integer fanOut, ModifyMode mode, ValidationLevel validation)Sets the fork fanout (number of tasks per output link) for a Fork node. final static NetworkStructsnSetForkFanoutBatch(NetworkStruct sn, Map<Integer, Integer> fanOuts, ModifyMode mode, ValidationLevel validation)Sets fork fanout for multiple Fork nodes in a single operation. final static DoublesnGetForkFanout(NetworkStruct sn, Integer forkNodeIdx)Gets the current fork fanout for a Fork node. -
-
Method Detail
-
snSetForkFanout
final static NetworkStruct snSetForkFanout(NetworkStruct sn, Integer forkNodeIdx, Integer fanOut, ModifyMode mode, ValidationLevel validation)
Sets the fork fanout (number of tasks per output link) for a Fork node.
Updates the
fanOutfield in the ForkNodeParam stored innodeparam.- Parameters:
sn- NetworkStruct to modifyforkNodeIdx- Node index of the Fork node (0-based)fanOut- Number of tasks to create per output link (must be >= 1)mode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to apply- Returns:
Modified NetworkStruct
-
snSetForkFanoutBatch
final static NetworkStruct snSetForkFanoutBatch(NetworkStruct sn, Map<Integer, Integer> fanOuts, ModifyMode mode, ValidationLevel validation)
Sets fork fanout for multiple Fork nodes in a single operation.
More efficient than calling snSetForkFanout multiple times.
- Parameters:
sn- NetworkStruct to modifyfanOuts- Map from fork node index to fanout valuemode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to apply- Returns:
Modified NetworkStruct
-
snGetForkFanout
final static Double snGetForkFanout(NetworkStruct sn, Integer forkNodeIdx)
Gets the current fork fanout for a Fork node.
- Parameters:
sn- NetworkStruct to queryforkNodeIdx- Node index of the Fork node (0-based)- Returns:
Current fanout value, or NaN if not set
-
-
-
-