[infinispan-dev] RemoteCache vs BasicCache
Mircea Markus
mmarkus at redhat.com
Tue Jul 9 13:13:19 EDT 2013
On 9 Jul 2013, at 20:07, Sanne Grinovero <sanne at infinispan.org> wrote:
> On 9 July 2013 18:01, Mircea Markus <mmarkus at redhat.com> wrote:
>>
>> On 9 Jul 2013, at 13:47, Sanne Grinovero <sanne at infinispan.org> wrote:
>>
>>> Indeed that's an excellent idea. But I would add also a common parent
>>> interface having the basic functionality common to all.
>>
>> If ConcurrentMap doesn't have what we need, of course :-)
>
> ConcurrentMap adds a load of pitfalls which should not be there: all
> the methods whose result is depending on the node they are run on.
>
> I know we make it clear in javadocs and several warnings on the doc,
> but experience tells that this is not good enough :-(
>
> I'd propose to remove them all, and provide an adapter layer
> (optional) for those needing to replace a ConcurrentMap in their code.
> Methods like "size()" - as discussed before - are possibly useful for
> statistics and diagnostics, and therefore should be accessed in a
> different explicit way.
>
> cache.diagnosticsStatistics().localContainerSize()
+1. That would be part of the migration towards to JCache API and implemented in 7.0. I think Tristan was looking for something now.
Cheers,
--
Mircea Markus
Infinispan lead (www.infinispan.org)
More information about the infinispan-dev
mailing list