object-pooling Questions
6
Solved
I have a class that is expensive to construct, in terms of time and memory. I'd like to maintain a pool of these things and dispense them out on demand to multiple threads in the same process.
Is...
Sansone asked 4/11, 2009 at 4:49
8
What is object pooling and what is a weak object reference ?
How can we implement them using Java?
Molasses asked 7/2, 2011 at 13:5
1
Solved
What is the proper way to use ArrayPool with reference types?
I was assuming that it would be full of objects that were just 'newed up' with the default constructor.
For example, in the code bel...
Rufus asked 5/8, 2019 at 23:29
1
Solved
I am building a UDP-based application that receives and sends multiple packets.
I could build a new DatagramPacket for each send, or I recycle one instance for the life of my application.
Are ...
Voorhis asked 13/10, 2015 at 18:4
3
Solved
Is it possible to create a generic object pool that creates new objects inside it?
Plus it would be nice if this object creation could receive parameters.
public interface IPoolable
{
void Disp...
Adis asked 22/6, 2016 at 19:39
1
Solved
I'm currently trying to build some code execution optimization for a contest, and was looking at the ObjectPool pattern to favor object reuse instead of new object instantiation.
I've put together...
Meingoldas asked 28/1, 2017 at 9:33
3
Solved
I need to create a pool of socket connections which will be served to multiple worker threads. Is there a thread safe object pool implementation with functionality similar to Apache Commons' ...
Culliton asked 1/3, 2011 at 23:18
6
How would I write a generic InternPool<T> in Java? Does it need a Internable interface?
String in Java has interning capabilities; I want to intern classes like BigDecimal and Account.
Columbary asked 24/7, 2010 at 4:22
5
EDIT: One more piece of possibly relevant info: The use case in which I see the problem is tab switching. That is, I create view X on tab A, remove it when leaving tab A, then recycle it into tab B...
Willard asked 30/5, 2015 at 14:44
7
Does the following basic object pool work? I have a more sophisticated one based on the same idea (i.e. maintaining both a Semaphore and a BlockingQueue). My question is - do I need both Semaphore ...
Anti asked 16/7, 2009 at 12:10
3
Solved
I'm on a webservice server and I have objects with an internal connection.
Initializing this connection takes really long so my idea was to use an object pool to reuse the connections among differe...
Arezzo asked 16/7, 2013 at 13:46
3
Solved
I am trying to develop an ObjectPool, which can be used with any Object without changing the source of neither the Pool nor the Object - but I can´t find any way to write the get()-function ("Mainc...
Manvil asked 27/12, 2013 at 17:27
9
I'm looking for a modern implementation of an object pool in Java. I can see the apache commons one, but to be honest, I'd rather one that uses generics, and the concurrency stuff from more r...
Bidget asked 3/9, 2010 at 13:21
3
Solved
My requirement is very simple to understand.
I want to call a web service from my Java web application with restriction of maximum 10 webservice calls per minute. Just after 1 minute, I can establ...
Monet asked 20/10, 2011 at 7:29
0
We use a number of large objects. Ideally, we'd like to make all of them permanently available to client code, but they don't fit in physical memory all at once. So when we approach memory limits, ...
Hertfordshire asked 31/12, 2012 at 9:27
3
Solved
I don't necessarily mean implemented using the singleton pattern, but rather, only having and using one instance of a pool. I don't like the idea of having just one pool (or one per pooled type). H...
Barny asked 9/2, 2011 at 19:24
4
When should one prefer object pool over dynamically allocated objects?
I need to create and destroy thousands of objects per second. Is it by itself enough to decide in favor of object pool?
Than...
Mchail asked 9/8, 2009 at 9:1
1
Solved
It's my understanding that in Spring, all objects are treated by default as singletons. If singleton is set to false, then a new object will be served at each request.
But what if I wanted to poo...
Nedanedda asked 21/5, 2009 at 13:52
1
© 2022 - 2024 — McMap. All rights reserved.