<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">&lt;<a href="mailto:mudokonman@gmail.com" target="_blank">mudokonman@gmail.com</a>&gt;</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>&lt;<a href="mailto:vblagoje@redhat.com" target="_blank">vblagoje@redhat.com</a>&gt; wrote:<br>
&gt; On 3/13/2014, 11:39 AM, William Burns wrote:<br>
&gt;&gt; On Thu, Mar 13, 2014 at 11:14 AM, Vladimir Blagojevic<br>
&gt;&gt; &lt;<a href="mailto:vblagoje@redhat.com" target="_blank">vblagoje@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Mircea and I wanted to &quot;promote&quot; AdvancedCacheLoader.KeyFilter or merge<br>
&gt;&gt;&gt; it with one filter we all choose to use because we have so many of these<br>
&gt;&gt;&gt; internal filter classes it is ridiculous. The filter you wrote is THE one?<br>
&gt;&gt; I can&#39;t say that for sure.  Basically the KeyFilter that exists in the<br>
&gt;&gt; notifications package was what I was going to use as it is more<br>
&gt;&gt; generic since the method is called accept, which I thought was better<br>
&gt;&gt; than shouldLoadKey.<br>
&gt;&gt;<br>
&gt;&gt; Are we thinking we would get rid of the KeyFilter and only use<br>
&gt;&gt; KeyValueFilter though ?<br>
&gt;&gt;<br>
&gt;&gt;   - Will<br>
&gt;&gt;<br>
&gt; Not sure Will. I would move both KeyFilter and KeyValueFilter in some<br>
&gt; 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&#39;t have the value yet and we&#39;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&#39;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>