Agreed. I'm not sure about this last implementation I was stuck with the JoSQL one
On Tue, May 29, 2012 at 10:45 AM, Jeff MAURY <[email protected]>wrote: > That was I guessed but I don't see how it is implemented in the code as you > can put an object in the cache with an expiresIn parameter means it a > relative option. And I think the relative vs absolute should be hidden by > the isExpired method. > > Jeff > > > On Tue, May 29, 2012 at 10:22 AM, Raffaele P. Guidi < > [email protected]> wrote: > > > Ok, got it: absolute means an absolute date and time for expiration (i.e. > > valid until midnight, may, 5, 2012), where relative means that the item > is > > valid for i.e. 5 minutes since its creation > > > > On Tue, May 29, 2012 at 10:02 AM, Jeff MAURY <[email protected] > > >wrote: > > > > > Hi, > > > > > > I you look at the code of the collectExpired in > MemoryManagerServiceImpl: > > > > > > @Override > > > public long collectExpired() > > > { > > > int limit = 50; > > > return free( limit( filter( pointers, relative ), limit ) ) > > > + free( limit( filter( pointers, absolute ), > limit > > > ) ); > > > > > > } > > > > > > where relate and absolute are 2 Predicate fields but with the same > > > definition. > > > The rationale is that this will cause up to 100 pointers to be freed > but > > > most important, what's the semantic of absolute and relative ? > > > > > > Thanks > > > Jeff > > > > > > > > > On Tue, May 29, 2012 at 7:43 AM, Raffaele P. Guidi < > > > [email protected]> wrote: > > > > > > > Uhm, if the filter is wrong it's probably my fault but I don't get > > > exactly > > > > what you mean with "relative and absolute". The 50 limit was to keep > > the > > > > collect operation light and unobtrusive. > > > > > > > > Ciao, > > > > R > > > > > > > > On Tue, May 29, 2012 at 12:54 AM, Jeff MAURY < > [email protected] > > > > >wrote: > > > > > > > > > Hello, > > > > > > > > > > I am working on getting the code coverage better than it is today > > and I > > > > > looked at the collectExpired in MemoryManagerServiceImpl and I have > > the > > > > > following questions: > > > > > > > > > > 1) it limits the number of pointers to be freed to 50, no problem, > > but > > > > what > > > > > is the rationale of calling free twice using the same predicates > > > relative > > > > > and absolute (they are the same): I don't get the exact semantic of > > > those > > > > > two predicates. Can someone help me. BTW, those 2 predicates are > > buggy > > > > > because they filter pointers based on fact that they are not free > > (OK) > > > > and > > > > > not expired !!! (KO). I will open a JIRA but I need to understand > the > > > > > semantic better in order to submit a patch. > > > > > > > > > > Thanks > > > > > > > > > > -- > > > > > Jeff MAURY > > > > > > > > > > > > > > > "Legacy code" often differs from its suggested alternative by > > actually > > > > > working and scaling. > > > > > - Bjarne Stroustrup > > > > > > > > > > http://www.jeffmaury.com > > > > > http://riadiscuss.jeffmaury.com > > > > > http://www.twitter.com/jeffmaury > > > > > > > > > > > > > > > > > > > > > -- > > > Jeff MAURY > > > > > > > > > "Legacy code" often differs from its suggested alternative by actually > > > working and scaling. > > > - Bjarne Stroustrup > > > > > > http://www.jeffmaury.com > > > http://riadiscuss.jeffmaury.com > > > http://www.twitter.com/jeffmaury > > > > > > > > > -- > Jeff MAURY > > > "Legacy code" often differs from its suggested alternative by actually > working and scaling. > - Bjarne Stroustrup > > http://www.jeffmaury.com > http://riadiscuss.jeffmaury.com > http://www.twitter.com/jeffmaury >
