Class JoinRound
Join and the number of branches started in that round.
Join.fork(Context, List, Function) and Join.forkWithRoundKey(String, List, Function) create the round and pass the same value
to every branch builder and to the join builder. Put it in the input of each branch Step, of the
join Step, and of the next round's split Step. Treat it as an opaque token: a branch passes it
to Join.endBranch(Context, JoinRound, T) or Join.reportBranchResult(Context, JoinRound, T), the join Step passes it to
Join.forAllBranches(JoinRound), Join.forFirstBranch(JoinRound), or Join.forBranches(JoinRound, int), and the
next split Step passes it to Join.forRemainingBranches(JoinRound, int). The application never counts
branches or invents round keys itself.
The round is persisted inside Step inputs as the JSON object
{"roundKey": "<key>", "branchCount": <count>}. These field names are stable in every
Dex SDK, so a Flow can mix Steps written against different SDK versions. Unknown JSON fields are
ignored on decode, so later SDK versions may add fields.
See Join for a complete split, branch, join, and reset example.
- Since:
- 1.44.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the round key and branch count.intReturns the number of branches started in this round.Returns the round key, which is the ChannelMap instance key that holds this round's branch results.inthashCode()Returns a hash code consistent withequals(Object).toString()Returns a diagnostic representation with the round key and branch count.
-
Constructor Details
-
JoinRound
Creates a round token.Applications normally receive rounds from
Join.fork(Context, List, Function)orJoin.forkWithRoundKey(String, List, Function). Construct one directly only when an RPC must report for a known round, for example to report a result on behalf of a canceled branch. The Join methods validate the values when they use the round, not here, so decoding stored input never fails because of them.- Parameters:
roundKey- the ChannelMap instance key of the round; Join methods reject a blank key or a key containing/branchCount- the number of branches started in the round; Join methods reject a negative count
-
-
Method Details
-
getRoundKey
Returns the round key, which is the ChannelMap instance key that holds this round's branch results.Join.fork(Context, List, Function)uses the split Step's execution ID, such asRequestQuotes-2, so Dex Web shows the round under the same name as the split Step in history.- Returns:
- the round key
-
getBranchCount
public int getBranchCount()Returns the number of branches started in this round.This equals the number of branch builders passed to
Join.fork(Context, List, Function)orJoin.forkWithRoundKey(String, List, Function). It may be zero.- Returns:
- the branch count
-
equals
-
hashCode
public int hashCode()Returns a hash code consistent withequals(Object). -
toString
-