On 05/03/2011 12:41 PM, Pete Muir wrote: > > On 2 May 2011, at 10:10, Manik Surtani wrote: > >> >> On 1 May 2011, at 13:38, Pete Muir wrote: >> >>>>> As in, user API? That's a little intrusive... e.g., put(K, V, cl) ? >>>> >>>> Not for put, since you have the class, just get, and I was thinking >>>> something more like: >>>> >>>> Foo foo = getUsing(key, Foo.class) >>> >>> This would be a pretty useful addition to the API anyway to avoid user >>> casts. >> >> Maybe as an "advanced" API, so as not to pollute the basic API? A bit like: >> >> Foo f = cache.getAdvancedCache().asClass(Foo.class).get(key); >> > > I don't get why you need the asClass() (or any other method call in here), > just declare a method > > <T> T get(key, Value.class); > > surely?
Yeah I agree, an asClass() method means an intermediate object and extra step which is a little clunky. Adding one method doesn't hurt. I'd like to see what the unmarshalling logic for this will look like - it is a novel and interesting, yet simple, solution; my favorite kind. :) -- - DML _______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev