[infinispan-dev] TimeService (ISPN-3069): CacheLoader API break
Manik Surtani
msurtani at redhat.com
Wed May 8 06:37:56 EDT 2013
On 8 May 2013, at 10:40, Pedro Ruivo <pedro at infinispan.org> wrote:
>
>
> On 05/08/2013 10:36 AM, Manik Surtani wrote:
>>
>> On 8 May 2013, at 10:34, Pedro Ruivo <pedro at infinispan.org> wrote:
>>
>>> Hi guys,
>>>
>>> In order to use the TimeService inside the cache loaders/stores I had to
>>> change the method init() to include a new parameter the TimeService.
>>
>> Won't this break custom/3rd party impls?
>
> probably/definitely yes.
>
> but I don't want to create a cache in all the cache loader/store tests
> that will be used to pick the TimeService.
>
> I tried to mock the ComponentRegistry but it is not possible for final
> classes. I don't want to remove the final :(
>
> Another alternative that come to my mind was to add a new method in
> AdvancedCache that returns the TimeService (and this I can mock it in
> the test suite)
I'd go for the latter.
-1 to breaking 3rd party impls.
>
> wdyt?
>
>>
>>>
>>> Do you see any issue about it?
>>>
>>> My first though was to pick the TimeService from the
>>> GlobalComponentRegistry, however this solution does not work for the
>>> test suite since the cache is null or it is "Mocked" and I don't have
>>> access to the GlobalComponentRegistry in other way.
>>>
>>> Cheers,
>>> Pedro
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Manik Surtani
>> manik at jboss.org
>> twitter.com/maniksurtani
>>
>> Platform Architect, JBoss Data Grid
>> http://red.ht/data-grid
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani
Platform Architect, JBoss Data Grid
http://red.ht/data-grid
More information about the infinispan-dev
mailing list