THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- For us to guarantee ordering,
childThread
's records cannot be returned untilparentThread
has finished processing theirs. So untilparentThread
finishes processing offsets1-50
, the results forchildThread
will have to be stored temporarily. - Each time a call for more metadata is made,
childThread
's results will be sent to to a PriorityQueue monitored byparentThread
via callback. But they will not be sent to the client until all offsets before it has been sent to the client. - At some point, offsets
1-50
has been returned. In this case, we will returnchildThread
's records as well if anothermetadataForStore
method call was made. So basically, we are delaying the sending of records processed bychildThread
until the offsets before it has been received by the user.
...