You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by Benoit Perroud <be...@noisette.ch> on 2012/06/08 15:48:54 UTC

Re: Design questions

Hi Jeff,

See my answers below.

2012/5/25 Jeff MAURY <je...@jeffmaury.com>:
> Hello,
>
> I have a couple of questions regarding the status of DirectMemory:
>
> 1) I am working on https://issues.apache.org/jira/browse/DIRECTMEMORY-82, I
> followed the pattern that was applied to ByteBufferAllocator that is to
> request objects (CacheService, MemoryService) to implement
> java.io.Closeable.
> However, the close method of this interface throws an IOException witch is
> unlikely to happen in our memory world. So do you think we should keep
> implementing this interface or just add a close method in the contract of
> those objects ?

Staying aligned with java.io.Closable is desired. And in our memory
world, as soon as we start having multiple layers of cache (heap,
off-heap, file for instance) then it's more likely expected to have
IOException (with the files :))

> 2) The various layer of the architecture (CacheService, MemoryService,
> ByteBufferAllocator) are described through an interface. But it seems a lot
> of implementation dependant methods are there: collectXXXX,....
> Is it planned to revisit these definitions in the near future ? In the same
> direction, the default CacheService implementation has a Timer whose goal
> is to call an action on the MemoryService layer !!!

These definitions *need* to be revisited. I would like to see a
function like "setEvictionPolicy()", but we haven't had time to go
through.

Feel free to propose your own thoughts. Any ideas are welcome.

> Thanks
> Jeff

Thanks to you,

Benoit.