You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Oliver Siegmar <ol...@siegmar.net> on 2005/04/13 19:39:08 UTC

[PATCH] [commons-configuration] - Added a preload feature to DatabaseConfiguration

Hi folks,

the attachted (svn-)patch adds a preload feature to the DatabaseConfiguration 
class.

I added (for backwards compatibility) a third constructor with a preloadData 
boolean variable. If this variable is set to true, all configuration data is 
read in one step and then cached in a local Map.

This is more performant (and more database gentle) because all following 
operations (getProperty(), getKeys(), ...) are done on the local Map (but 
kept in sync with the database, if it is a write access).

I'd be happy if you apply it to the trunk.


Best,
Oliver

Re: [PATCH] [commons-configuration] - Added a preload feature to DatabaseConfiguration

Posted by Emmanuel Bourg <eb...@apache.org>.
Thank you for the patch Oliver, could you append it to Bug 33553 please 
? (http://issues.apache.org/bugzilla/show_bug.cgi?id=33553). This is the 
bug related to caching the DatabaseConfiguration properties.

Emmanuel Bourg


Oliver Siegmar wrote:

> Hi folks,
> 
> the attachted (svn-)patch adds a preload feature to the DatabaseConfiguration 
> class.
> 
> I added (for backwards compatibility) a third constructor with a preloadData 
> boolean variable. If this variable is set to true, all configuration data is 
> read in one step and then cached in a local Map.
> 
> This is more performant (and more database gentle) because all following 
> operations (getProperty(), getKeys(), ...) are done on the local Map (but 
> kept in sync with the database, if it is a write access).
> 
> I'd be happy if you apply it to the trunk.
> 
> 
> Best,
> Oliver

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