db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mail.lt>
Subject Re: ObjectCache
Date Thu, 20 Feb 2003 05:58:53 GMT

Yes, it is better to use soft/hard cache (hold strong references on LRU
objects) It is much more faster (constant time).

----- Original Message -----
From: "Matthew Baird" <Matthew.Baird@motiva.com>
To: "OJB Developers List" <ojb-dev@db.apache.org>; "Armin Waibel"
<armin@code-au-lait.de>
Sent: Thursday, February 20, 2003 2:29 AM
Subject: RE: ObjectCache


i have this exact soft/hard cache implemented already (not using lrumap) I
could donate.

What is the advantage of LRUMap?

-----Original Message-----
From: Armin Waibel [mailto:armin@code-au-lait.de]
Sent: Wednesday, February 19, 2003 3:05 PM
To: OJB Developers List
Subject: Re: ObjectCache


Hi Tim,

----- Original Message -----
From: "O'brien, Tim" <tobrien@transolutions.net>
To: "'OJB Developers List'" <ojb-dev@db.apache.org>
Sent: Wednesday, February 19, 2003 11:37 PM
Subject: ObjectCache


> ObjectCacheDefaultImpl uses SoftReferences for the Cache and let's the
JVM
> take care of memory management.  I was going to start on a about
> implementing a size limited cache to allow for a hard limit in terms
of
> memory or number of objects.  Does anyone have any ideas for the
> implementation?  Since OJB already depends on commons-collections, I
was
> leaning towards using the LRUMap implementation, any objections?

Nope. Smart idea using the commons LRUMap.
I currently checked in a refactored cache-package. Now every
PB instance get it's own ObjectCache instance (old version the
cache was a singleton). Your new LRU-ObjectCache implementation
need a constructor with PersistenceBroker parameter.

regards,
Armin

>
> --------
> Tim O'Brien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org



Mime
View raw message