[ 
https://issues.apache.org/jira/browse/DIRECTMEMORY-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572985#comment-13572985
 ] 

Jaromir Hamala commented on DIRECTMEMORY-124:
---------------------------------------------

Hi, I attached an implementation of CacheValuesIterable which allows to specify 
whether resulting iterator should be either:
- strict - it means that it fails on expired item
- relaxed - it guarantees that if hasNext() returns true, the subsequent next() 
always return a value. but the value might be stalled or expired.

let me know what you think. 
                
> Create an utility class Iterable<V> over Cache<K,V> 
> ----------------------------------------------------
>
>                 Key: DIRECTMEMORY-124
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-124
>             Project: Apache DirectMemory
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.1-incubating
>            Reporter: Tommaso Teofili
>            Assignee: Tommaso Teofili
>            Priority: Minor
>             Fix For: 0.2
>
>         Attachments: nonStrictCacheIterator.patch
>
>
> That'd be useful to iterate over cache values and at the same time avoid 
> loading such items into memory all together.
> E.g. I'm using DM to keep a huge list of graph vertices without spending too 
> much memory, but then I need at some point to iterate over them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to