Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

HbnContainer improvement

Pavel Micka
1 decade ago Feb 20, 2010 5:32pm

Hi,

I have improved Hbncontainer implementation, so I want to discuss my changes with someone familiar with architecture of this class and if the changes are ok, I'd like to ask for commit rights for incubator.

The first change is added method updateEntity. It should be used, when user updates entity transparently or instead of explicit update. For example now, if user updates the entity via Hibernate nothing notifies container, that the data it holds are no longer valid.

The second change is about index buffering. In current version the list called "ascRowBuffer" contains whole objects (100 of them), but only their identifiers are needed (because the data itself are cached by weakreferences set "itemCache"). So if someone has big objects (long articles, binary data etc.) this could be really big memory consumer and database time consumer (because we select something we dont need).
The change is simple - projection on id column and some changes in code to make it work with ids not whole objects.

Pavel Micka

edit: one thing I should change now are names of variables and methods using rowbuffer (because now it's not rowbuffer, but only id buffer :-))

Last updated on Feb, 22nd 2010
Matti Tahvonen
1 decade ago Mar 01, 2010 2:54pm
Pavel Micka
1 decade ago Mar 01, 2010 3:52pm
Matti Tahvonen
1 decade ago Mar 02, 2010 7:01am
Pavel Micka
1 decade ago Mar 02, 2010 1:08pm
Matti Tahvonen
1 decade ago Mar 03, 2010 8:22am
Pavel Micka
1 decade ago Mar 03, 2010 5:47pm
Matti Tahvonen
1 decade ago Mar 04, 2010 1:27pm
Pavel Micka
1 decade ago Mar 04, 2010 3:55pm
Henri Sara
1 decade ago Mar 08, 2010 11:44am
Pavel Micka
1 decade ago Mar 10, 2010 2:32pm
Matti Tahvonen
1 decade ago Mar 11, 2010 10:50am
Pavel Micka
1 decade ago Mar 11, 2010 3:18pm