<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I remember there was some discussion to
      refactor listeners to drop the concept of pre-events and have the
      previous value available in the post-event (where applicable). I
      do not remember what decision was made about this. But if we do
      it, that would be already a big backwards incompatible change, so
      modifying some defaults regarding the behavior of the Listener
      annotation is just mildly disturbing. We'll have to
      apologize/document this anyway and also provide migration advice.<br>
      <br>
      On 08/22/2016 09:15 PM, William Burns wrote:<br>
    </div>
    <blockquote
cite="mid:CA+YCuUOW4kRhtvXhefC1Hdmt2i0vzFYh9BKny+JHzPRe6vw_+w@mail.gmail.com"
      type="cite">
      <div dir="ltr">I like the idea of having a variable to set on the
        listener annotation.  This way we can know for sure if we need
        to force previous values for some listeners and not for others.
        <div><span style="line-height:1.5"><br>
          </span></div>
        <div><span style="line-height:1.5">It seems the default should
            be to force the previous value to be more inline with the
            current behavior, but I fear no one will use the opposite in
            this case though.  What do you guys think?</span></div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Mon, Aug 22, 2016 at 4:31 AM Adrian Nistor
          &lt;<a moz-do-not-send="true" href="mailto:anistor@redhat.com">anistor@redhat.com</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Radim,<br>
          <br>
          Continuous query is built on top of these listeners. CQ
          _always_ needs<br>
          the previous value and it is very convenient in this case that
          the<br>
          command is forced to load the previous value. I imagine there
          may be<br>
          other use cases where we cannot live without the prev value.<br>
          <br>
          I think the listener should be able to state if it needs the
          prev value<br>
          at registration time. Maybe add a new attribute in the
          Listener<br>
          annotation? Similar to how we handled Observation.<br>
          <br>
          Adrian<br>
          <br>
          On 08/19/2016 11:34 PM, Radim Vansa wrote:<br>
          &gt; Hi,<br>
          &gt;<br>
          &gt; as I am trying to simplify current entry wrapping and
          distribution code,<br>
          &gt; I often find that listeners can get wrong previous value
          in the event,<br>
          &gt; and it sometimes forces the command to load the value
          even if it is not<br>
          &gt; needed for the command.<br>
          &gt;<br>
          &gt; I am wondering if we should change the previous value in
          events to<br>
          &gt; Optional - we can usually at least detect that we cannot
          provide a<br>
          &gt; reliable value (e.g. after retry due to topology change,
          or because the<br>
          &gt; command did not bothered to load the previous value from
          cache loader)<br>
          &gt; and return empty Optional.<br>
          &gt;<br>
          &gt; WDYT?<br>
          &gt;<br>
          &gt; Radim<br>
          &gt;<br>
          <br>
          _______________________________________________<br>
          infinispan-dev mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/infinispan-dev"
            rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
infinispan-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>