RE: [OJB-developers] ObjectCache and IdentityFactory]
Brought to you by:
thma
From: <Joa...@tp...> - 2002-03-26 10:00:52
|
[snip Cache memory leaks & gc-strategies] I've been thinking about this topic for some time now. I think we need some kind of generic pool. It should be configurable and smart. I've once implemented such a beast which even provided a function to tell the cache that the more recently used x% of the objects should not be gc-able. It is quite some work to implemnt such things in a smart and performant way but this work is usually needed only once. OJB has quite some pools, where each has it's own implementation (from the simple PersistenceBrokerPool for the Server to the ObjectCache, which is more sophisticated). I think a unified Pool utility class would be A Good Thing. We could even create a pseudo-gc thread that throws away empty Soft/WeakReferences perodically. This could be done in a single thread, even when you got 15 pools (which would not be so easy, when using 15 different implementations). Of course this generic pool would have to scale up and down (i.e. be able to act as a really simple pool with no gc-tricks as well as a gc-enabled pool with configurable lru-list and so on ...). What do you think of that? regards Joachim P.S.: Sorry, Florian, for the useless mail. Notes sometimes got the "Send" Button, where "New Mail" should be ;-) |