[infinispan-dev] Distributed tasks - specifying task input
Vladimir Blagojevic
vblagoje at redhat.com
Thu Dec 16 06:34:16 EST 2010
On 10-12-16 7:25 AM, Manik Surtani wrote:
>
> I think it makes more sense on CacheManager because we might have a
> task operating on data of a few caches, not just one. So to be safe
> and not sorry I'd go with CacheManager. newDistributedTask can have
> parameters to specify which cache(s) to use.
>
> So you'd do CacheManager.newDistributedTask(task, Map<String, K>
> cacheNamesAndKeys)?
>
No, I'd shift these parameters to DistributedTask#execute unless we
absolutely need them at for task creation. Let's keep factory method for
DistributedTask as simple as possible. I'd rather have a single factory
method and develop and grow DistributedTask API independently of
CacheManager than have multiple overloaded factory methods for
DistributedTask.
More information about the infinispan-dev
mailing list