[infinispan-dev] TimeService (ISPN-3069): CacheLoader API break

Pedro Ruivo pedro at infinispan.org
Tue May 14 04:51:18 EDT 2013



On 05/14/2013 09:44 AM, Dan Berindei wrote:
>
>
>
> On Tue, May 14, 2013 at 11:37 AM, Manik Surtani <msurtani at redhat.com
> <mailto:msurtani at redhat.com>> wrote:
>
>
>     On 14 May 2013, at 08:33, Dan Berindei <dan.berindei at gmail.com
>     <mailto:dan.berindei at gmail.com>> wrote:
>
>>     If we want to keep it hidden, then I think it would be best to
>>     leave the getTimeService() method only in
>>     ComponentRegistry/GlobalComponentRegistry and remove it from the
>>     AdvancedCache interface.
>
>     +1.

first I have two situations here:

in production: it's indifferent for me have it in the AdvancedCache or 
in the ComponentRegistry, in the cache loader/store and in the Extended 
Stats I have access to the cache and I can pick from everywhere.

in the test suite: I first try to have it only in the ComponentRegistry 
and I was not be able to mock it because the class is final (I believe 
that is final for some reason). In addition, all the cache store tests 
mocks the Cache interface. That's why I put it in the AdvancedCache.

>
>>     We might want to remove it from the configuration, too.
>
>     It is definitely *not* configurable and *not* a part of the
>     configuration.  See an earlier thread on this subject:
>     http://bit.ly/102aQ9R

This is another issue I have. I need to have the TimeService in the 
Extended Stats and this are a CustomInterceptor. My first try was to 
replace and rewire the GlobalComponent but this does not work because I 
don't have any @Inject method in the CustomInterceptor where I can 
replace for TimeService implementation in the test suite. That's why it 
is in the GlobalConfiguration.

If you have other alternatives that I'm not aware let me know.

>
>
>
> It is in the PR:
> https://github.com/infinispan/infinispan/pull/1813/files#diff-32
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>


More information about the infinispan-dev mailing list