[infinispan-dev] Too late for an 5.0 API change?

Manik Surtani manik at jboss.org
Tue Jul 19 08:35:03 EDT 2011


I would rather leave this alone for now.  Once JSR-107 is complete we'll need to change Listenable to be compatible anyway so may as well just do it once.  

And re: fluent API for listeners, why not suggest that on the JSR-107 Google Group.  :)

On 19 Jul 2011, at 13:16, Mircea Markus wrote:

> This is isolated and won't break API compatibility so I think it makes sense.
> 
> On 19 Jul 2011, at 09:50, Galder Zamarreño wrote:
> 
>> Hi all,
>> 
>> What do people think of changing the addListener() APIs to be more fluent?
>> 
>> We could either:
>> 
>> 1. Change Listenable to be Listenable<T> and then have:
>> 
>>   <T> addListener(Object listener);
>> 
>> So, implementers such as EmbeddedCacheManager would implement Listenable<EmbeddedCacheManager> and so would implement:
>> 
>>   EmbeddedCacheManager addListener(Object listener);
>> 
>> 2. Or, more simply, have Listenable define:
>> 
>>   Object addListener(Object listener);
>> 
>> and EmbeddedCacheManager using covariants to implement:
>> 
>>   EmbeddedCacheManager addListener(Object listener);
>> 
>> Btw, the same would apply to removeListener.
>> 
>> Thoughts?
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>> 
>> 
>> _______________________________________________
>> 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

Lead, Infinispan
http://www.infinispan.org






More information about the infinispan-dev mailing list