You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Peter Donald <do...@apache.org> on 2001/09/01 04:27:14 UTC

Re: Indexed Pools

On Sat, 1 Sep 2001 01:32, Robert.Harris@jax.ecitele.com wrote:
> Hello, I'm new to avalon and am just begining to design/implement some
> components.

Hi!

> One block I'm realizing would be useful, but which doesn't seem to be
> implemented, is a growable pool with instances of objects which are indexed
> so that they can be specifically retrieved from different components.
> These instances would also be able to be reused, after they are explicitly
> freed back to the pool.
>
> My current use is for use with a StateMachine following the State pattern.
> Upon receiving an asynchronous event,  I need to create/find the particular
> StateMachine  context associated with the  event.  I'd like to allocate a
> certain number  at startup.
>
> Let me know if anyone has thought about this idea or has any feedback.

I assume you have looked at pools for excalibur? You could use them as basis 
of such a pool. 

Let me see if I get what you want. You have pools 1-9 and they are associated 
with contexts 1-9. Each time you access pool you access the pool coresponding 
to you context? If so I have heard others want this functionality, and 
another version of this is using String version where you acess pool based on 
name. I guess you would call that MappedPool or similar.

-- 
Cheers,

Pete

*------------------------------------------------------*
| "Common sense is the collection of prejudices        |
|  acquired by age 18. " -Albert Einstein              |
*------------------------------------------------------*

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