Return-Path: Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 59083 invoked from network); 20 Feb 2003 05:59:14 -0000 Received: from jim.skynet.lt (212.122.68.65) by daedalus.apache.org with SMTP; 20 Feb 2003 05:59:14 -0000 Received: (qmail 41748 invoked by uid 85); 20 Feb 2003 05:59:09 -0000 Received: from baliuka@mail.lt by jim.skynet.vl with qmail-scanner-1.03 (. Clean. Processed in 4.880385 secs); 20 Feb 2003 05:59:09 -0000 X-Qmail-Scanner-Mail-From: baliuka@mail.lt via jim.skynet.vl X-Qmail-Scanner: 1.03 (Clean. Processed in 4.880385 secs) Received: from unknown (HELO user) (10.1.17.1) by jim.skynet.vl with SMTP; 20 Feb 2003 05:59:04 -0000 Message-ID: <041101c2d8a5$2b142860$0111010a@user> From: "Juozas Baliuka" To: "OJB Developers List" , "Armin Waibel" References: Subject: Re: ObjectCache Date: Thu, 20 Feb 2003 07:58:53 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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" To: "OJB Developers List" ; "Armin Waibel" 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" To: "'OJB Developers List'" 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