You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Carsten Ziegeler <cz...@apache.org> on 2013/08/05 09:12:33 UTC
Clarification of RequestProgressTracker#done()
The javadocs of RequestProgressTrackr#done state:
" /**
* Call this when done processing the request - all calls except the
first
* one are ignored
*/
void done();
"
I'm wondering what is ment with "the first one"? In addition, looking at
the implementation in the Sling engine, though it has a done flag, this
flag is not evaluated in most methods.
I would expect that after a call to done() only dump is possible and all
calls to log etc. are ignored. Is that the intention?
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Clarification of RequestProgressTracker#done()
Posted by Carsten Ziegeler <cz...@apache.org>.
Ah, so "all calls except the first one" means all calls to the "done"
method, yes, thanks. I guess I was reading too much into the comment :)
And the implementation fits that comment nicely.
Thanks
Carsten
2013/8/5 Bertrand Delacretaz <bd...@apache.org>
> Hi,
>
> On Mon, Aug 5, 2013 at 9:12 AM, Carsten Ziegeler <cz...@apache.org>
> wrote:
> > The javadocs of RequestProgressTrackr#done state:
> > ...Call this when done processing the request - all calls except the
> > first one are ignored...
>
> > ...I would expect that after a call to done() only dump is possible and
> all
> > calls to log etc. are ignored. Is that the intention?...
>
> I have vague memories of writing that comment long ago, your
> interpretation sounds right but in retrospect I'm not sure if that's
> really useful. Maybe just to get the duration of the current request?
> In which case multiple calls to done() do not matter, it would be only
> the last one that's relevant.
>
> -Bertrand
>
--
Carsten Ziegeler
cziegeler@apache.org
Re: Clarification of RequestProgressTracker#done()
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Mon, Aug 5, 2013 at 9:12 AM, Carsten Ziegeler <cz...@apache.org> wrote:
> The javadocs of RequestProgressTrackr#done state:
> ...Call this when done processing the request - all calls except the
> first one are ignored...
> ...I would expect that after a call to done() only dump is possible and all
> calls to log etc. are ignored. Is that the intention?...
I have vague memories of writing that comment long ago, your
interpretation sounds right but in retrospect I'm not sure if that's
really useful. Maybe just to get the duration of the current request?
In which case multiple calls to done() do not matter, it would be only
the last one that's relevant.
-Bertrand