Hi Manik,
The purpose is the usual that the application would want to take some action
on expiry of the entry. Ofcourse the application can also start a timer in
parallel but those timers may again need to be synced up in case of
distributed apps.
However, your explanation brings out another question - is there an
additional overhead (memory related) using expiry on the cache entries as
compared to keeping an active control over the cache entry creation and
deletion. An application using only cache entries with expiry.
Thanks,
Kapil
Date: Fri, 18 Jun 2010 22:44:59 +0100
From: Manik Surtani <manik(a)jboss.org>
Subject: Re: [infinispan-dev] Notifications for cache entry expired
To: infinispan -Dev List <infinispan-dev(a)lists.jboss.org>
Message-ID: <3EAE786D-FB0E-4217-AE4F-7D270B3A955F(a)jboss.org>
Content-Type: text/plain; charset=us-ascii
It is possible, yes, but it will never be very accurate since entries
are
only tested for whether they are expired in one of several ways:
1. A user thread asks for the entry and it has expired. It will then
be
removed.
2. The entry is passivated/overflowed to disk and it has expired. It
will
again be removed.
3. An eviction maintenance thread kicks in and detects that it has
expired. It will again be removed.
So even if a notification is generated, it will not be generated at
the
time the entry expired, but rather at the time Infinispan realises the entry
has expired (which may be later).
Also, what is the purpose of this? It does add quite a bit of
overhead.
Cheers
Manik
On 18 Jun 2010, at 18:07, kapil nayar wrote:
Hi,
I don't see the notification for cache entry expired.
Is it on the roadmap / possible to support?
Thanks,
Kapil Nayar
______________________________
_________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev