<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite"><div><blockquote type="cite"><div dir="ltr"><p dir="ltr"><br>
              &gt; The second I have no idea how to implement as we do
              not have<br>
              &gt; CacheEntryExpired event. True, spec is not rigorous
              that such an event<br>
              &gt; has to be fired immediately after an entry has
              expired but eventually<br>
              &gt; (which might be on access). Either way, I am all ears
              on suggestions how<br>
              &gt; to implement this one.<br>
              &gt;</p><p>I guess @CacheEntryEvicted/@CacheEntriesEvicted would be
              the closest thing we have in Infinispan. But you can't
              check in the listener if the entry was evicted because it
              expired or because there wasn't enough space in the data
              container (yet).<br>
            </p>
          </div>
        </blockquote>
        <div>There could definitely be something clever we could do
          here. &nbsp;Adding the (expired or evicted) entry to a queue for
          later notification. &nbsp;But that would definitely need to be
          something we explicitly enable rather than have running all
          the time, since it kinda defeats the purpose of evicting
          something to save memory only to have it put in a different
          queue elsewhere until an event is fired.</div>
      </div>
    </blockquote>
    <br>
    Exactly! One thing we could do is what RI does. Check for expired on
    entry access from JSR module and during normal expired cleanup
    cycle..... <br></div></blockquote><div><br></div></div><div>Be mindful of performance considerations here - this could get very expensive.</div><br></div></div></blockquote><div><br></div><div>Exactly. I don't think you can use a queue for later notification, because you also have to cancel the notification if the user updates the same key again. I mean if an entry was supposed to expire at 12:00 and the user did a put at 12:59 with expiration time 12:30, then he shouldn't get an expired notification at 12:00 - even if the entry was evicted in the meantime.<br></div></div></div></div></blockquote></div><div><br></div>Yes; definitely not a simple thing to do.<br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div><div>Platform Architect, JBoss Data Grid</div><div><a href="http://red.ht/data-grid">http://red.ht/data-grid</a></div></div></div></span></div></span></div></span>
</div>
<br></body></html>