<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 5:58 PM, William Burns <span dir="ltr"><<a href="mailto:mudokonman@gmail.com" target="_blank">mudokonman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Mar 13, 2014 at 11:54 AM, Vladimir Blagojevic<br>
<div><<a href="mailto:vblagoje@redhat.com" target="_blank">vblagoje@redhat.com</a>> wrote:<br>
> On 3/13/2014, 11:39 AM, William Burns wrote:<br>
>> On Thu, Mar 13, 2014 at 11:14 AM, Vladimir Blagojevic<br>
>> <<a href="mailto:vblagoje@redhat.com" target="_blank">vblagoje@redhat.com</a>> wrote:<br>
>>> Mircea and I wanted to "promote" AdvancedCacheLoader.KeyFilter or merge<br>
>>> it with one filter we all choose to use because we have so many of these<br>
>>> internal filter classes it is ridiculous. The filter you wrote is THE one?<br>
>> I can't say that for sure. Basically the KeyFilter that exists in the<br>
>> notifications package was what I was going to use as it is more<br>
>> generic since the method is called accept, which I thought was better<br>
>> than shouldLoadKey.<br>
>><br>
>> Are we thinking we would get rid of the KeyFilter and only use<br>
>> KeyValueFilter though ?<br>
>><br>
>> - Will<br>
>><br>
> Not sure Will. I would move both KeyFilter and KeyValueFilter in some<br>
> major package so we can all use it throughout the codebase!<br>
<br>
</div>That is exactly what I was hoping to do with the new<br>
org.infinispan.filter package in core module.<br></blockquote><div><br></div><div>I would definitely keep KeyFilter, I imagine there are places where we don't have the value yet and we'd have to load it from a store to pass it to the filter.<br>
</div><div>Even for clustered listeners, it might make a difference for the initial transfer - although deciding which is optimal, loading all the keys and then loading accepted values one by one, or loading all the values upfront, isn't really doable without a hint from the user.<br>
<br></div><div>In a way I also see an overlap between KeyValueFilter and Converter. At least with SingleFileStore, KeyFilter can be used to filter keys before doing any real work, whereas KeyValueFilter/Converter can only be used to trim the amount of information to send over the network after the entry has been fully loaded.<br>
<br></div><div>Dan<br><br>
</div></div></div></div>