FYI, captured in ISPN-251
Sent from my iPhone
On 3 Nov 2009, at 19:16, Emmanuel Bernard <emmanuel(a)hibernate.org>
wrote:
On 3 nov. 09, at 19:03, Galder Zamarreno wrote:
>
>
> On 11/03/2009 05:37 PM, Manik Surtani wrote:
>> On 3 Nov 2009, at 16:31, Emmanuel Bernard<emmanuel(a)hibernate.org>
>> wrote:
>>
>>> Another option is to use a fluent API
>>> blah.usingContext().flags(FOO,BAR).remove();
>>
>> Hmm, that's a possibility. Maybe cache.withFlags(FOO,BAR).remove
>> (key)
>> where withFlags() returns a Cache.
>>
>> Wdyt, guys?
>
> Interesting idea Emmanuel, seems like you're quite fond of fluent
> APIs :)
>
> I'd stick with single word flags(), i.e.:
>
> cache.flags(FOO,BAR).remove(key)
>
> flags() looks explicit enough to me.
The reason I use usingContext() is for future extensibility. I don't
know your API well enough to know if that's necessary.
Do you need both flags and hints for example?
Do they apply for a single operation or many operations?
In the latter case I would do
Cache cache = CacheManager
.usingContext()
.flags(BOO)
.hints("faster")
.getCache();
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev