You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2014/12/17 19:35:14 UTC

[jira] [Resolved] (UIMA-4146) Support Snapshot iterators for FSIndexes

     [ https://issues.apache.org/jira/browse/UIMA-4146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor resolved UIMA-4146.
----------------------------------
    Resolution: Fixed

> Support Snapshot iterators for FSIndexes
> ----------------------------------------
>
>                 Key: UIMA-4146
>                 URL: https://issues.apache.org/jira/browse/UIMA-4146
>             Project: UIMA
>          Issue Type: New Feature
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 2.7.0SDK
>
>
> Implementing "protectIndices" could have a consequence that some updated FSs could be removed from the indices by the framework, and addedback later.  If the user code were iterating they might get unexpected ConcurrentModificationExceptions because of this.
> Extend the iterators to include "snapshot" iterators, that take a snapshot of the index contents at iterator creation time, and then use that to iterate over; this allows the iterator to avoid ConcurrentModificationExceptions.
> Do this in a manner to continue to support the "extended for" style of iterating, where you can write
> {code:java}
> for (MyAnnotation : fsIndexProducingSnapshotIterators) { ... }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)