incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raffaele P. Guidi" <raffaele.p.gu...@gmail.com>
Subject Re: Multiple caches within same JVM?
Date Sat, 15 Oct 2011 17:18:44 GMT
We can consider the current implementation as the shortest path to a working
and efficient off-heap cache, and I really would like to keep things this
simple - no configuration at at all for the default configuration - but the
subject of multiple buckets has been already brought up and give users a
choice will be great.

Now, I like the current Cache facade as it is (it is straightforward for
simple use cases) but MemoryStorage should be refactored - it is probably
wrong to have it as a singleton (the underlying OffHeapMemoryBuffer, the
basic building block, is not a singleton) - and we could write a
non-singleton implementation for the Cache as well - and here it is the
implementation for multiple caches (buckets?) in the same VM.

Then the Cache singleton facade could be rafactored to use the non singleton
one as its foundation.

Ciao,
    R

PS: a long answer to just say: ok, let's move towards this goal :D

On Sat, Oct 15, 2011 at 6:54 PM, Ashish <paliwalashish@gmail.com> wrote:

> Folks,
>
> While creating a DirectMemory sample, I realized that there is no way
> to create multiple caches within same JVM.
>
> This is a fairly common use case, and we might need multiple caches
> with different configurations.
>
> Are there any plans to move implementation towards this goal or we can
> handle this situation with current implementation?
>
> --
> thanks
> ashish
>
> Blog: http://www.ashishpaliwal.com/blog
> My Photo Galleries: http://www.pbase.com/ashishpaliwal
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message