pooling - Java resource pool -


I have app data that stores data in XML when user asks for data, then XML is read in institutions , Which is then shown through a few-like-servlet.

My problem is, after every refresh, data for some kind of service has to be processed again and parsing XML is expensive. There is too much XML to store all data in memory.

I was thinking something like resource pooling, where the program asks the bridge, if the name in the pool is the unit with foo . If it is, then foo is returned from the pool, if not, the foo has been created from XML and saved in the pool.

Something like this:

  unit unit = zero; Entity.setId (id); (Unit unitFormpool: pool.getAellientes ()) {if (entityFromPool.getId (.) Equals (entity.getId ())} {entity = entityFromPool (); IsInPool = True; } If (! INPool is) {entity = getEntityFromXML (); }  

I have read about Apache object pooling , but if I understand it correctly, then I can not store the F store. With this, 5 different entities and then ask if there is a special ID with pool.

Is there a library that can help with my problem? thanks a lot!

If you are talking about the Commons pool, you can put a look at the interface.

A "Key" pooling interface.

A key pool contains a pool of examples of each key value.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -