A Future with intermediate progress?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A Future with intermediate progress?

Ivan V.
IgniteFuture is an interface to pass the control upon an action completion.
But the action can be long running, and may have some intermediate
completion stages, e.g. data loading action progress can be measured as
loaded data percentage.
May it make sense to have an IgniteFuture subclass like
IgniteProgressableFuture with method #getProgress() : double ?
Reply | Threaded
Open this post in threaded view
|

Re: A Future with intermediate progress?

Pavel Tupitsyn-3
Hi,

Another common way of progress reporting is to provide overload for the
operation, e.g.
IgniteFuture doSomething();
IgniteFuture doSomething(Progress progress);

where Progress interface has a single "report(T)" method, and it is up to
user to implement it.

Thanks,

On Wed, Oct 14, 2015 at 4:50 PM, Ivan Veselovskiy <[hidden email]
> wrote:

> IgniteFuture is an interface to pass the control upon an action completion.
> But the action can be long running, and may have some intermediate
> completion stages, e.g. data loading action progress can be measured as
> loaded data percentage.
> May it make sense to have an IgniteFuture subclass like
> IgniteProgressableFuture with method #getProgress() : double ?
>



--
--
Pavel Tupitsyn
GridGain Systems, Inc.
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: A Future with intermediate progress?

yzhdanov
In reply to this post by Ivan V.
I don't think this makes sense. How would you measure progress of cache
put? Does anyone need that?

On the opposite, I agree that it would be nice to have future that is able
to notify user on primaries updated, then on backups update, but again
there were no requests for that.

--Yakov

2015-10-14 16:50 GMT+03:00 Ivan Veselovskiy <[hidden email]>:

> IgniteFuture is an interface to pass the control upon an action completion.
> But the action can be long running, and may have some intermediate
> completion stages, e.g. data loading action progress can be measured as
> loaded data percentage.
> May it make sense to have an IgniteFuture subclass like
> IgniteProgressableFuture with method #getProgress() : double ?
>