[infinispan-dev] CS API still needs more polishing?

Galder Zamarreño galder at redhat.com
Tue Sep 17 11:46:56 EDT 2013


Hi,

Doing this throws a warning due to unchecked assignment:

ExternalStore<Integer, String> boundedStore = new SingleFileStore();

Granted, the users won't be doing this, but should all cache stores use generics properly? At the end of the day, implementations such as SingleFileStore are what cache store developers are gonna be looking at to get inspiration of how to write cache stores.

I'm aware that some of the internals assume Object keys and values, and there will be a point where an unchecked cast will need to be done, but this should happen within the internals of our cache implementation. 

Cache store implementations should use generics properly.

Cheers,

p.s. Or maybe we should move to language were generics are properly enforced ;)
--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org




More information about the infinispan-dev mailing list