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/09 20:36:12 UTC
[jira] [Created] (UIMA-4146) Support Snapshot iterators for
FSIndexes
Marshall Schor created UIMA-4146:
------------------------------------
Summary: 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)