Closed
Conversation
bbakerman
commented
Mar 20, 2025
| */ | ||
| public static <K, V> Orchestrator<K, V> orchestrate(DataLoader<K, V> dataLoader) { | ||
| return new Orchestrator<>(new Tracker(), dataLoader); | ||
| } |
Member
Author
There was a problem hiding this comment.
needs injection of of the "tracker implementation" I think - maybe???
bbakerman
commented
Mar 20, 2025
| static <T> T castAs(Object o) { | ||
| //noinspection unchecked | ||
| return (T) o; | ||
| } |
bbakerman
commented
Mar 20, 2025
|
|
||
| <KT, VT> void record(Step<KT, VT> step) { | ||
| steps.add(step); | ||
| tracker.incrementStepCount(); |
Member
Author
There was a problem hiding this comment.
we know how many steps we can have
bbakerman
commented
Mar 20, 2025
| System.out.println("step " + index + " returned : " + v); | ||
| } | ||
| }); | ||
| } |
Member
Author
There was a problem hiding this comment.
This is where we can have tracker side effects to know things.
We should probably also handle exceptions by cancelling all "expectations on future load" since they will not happen
Maybe we just mark the Tracker as "exceptional"
bbakerman
commented
Mar 21, 2025
| } catch (Throwable ex) { | ||
| result.encodeAndSetResult(ex); | ||
| } | ||
| }); |
Member
Author
There was a problem hiding this comment.
Looks a lot like the actual CompletebleFuture code foe scheduling ;)
java.util.concurrent.CompletableFuture.AsyncRun
Member
Author
|
This is no longer needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Super POC stuff - pushed to allow others to see the ideas
This is not complete in any way - maybe it does not even belong here