Package org.apache.uima.cas.impl
Class DeferredIndexUpdates
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.IdentityHashMap<FSIndexRepositoryImpl,java.util.List<TOP>>
-
- org.apache.uima.cas.impl.DeferredIndexUpdates
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<FSIndexRepositoryImpl,java.util.List<TOP>>
class DeferredIndexUpdates extends java.util.IdentityHashMap<FSIndexRepositoryImpl,java.util.List<TOP>>
for XCAS and XMI deserialization, need to remember what's being added to the indexes and/or removed, because the actual FSs are not yet "fixed up" (adjusted for reference id's → actual addresses, including the sofa refs) for non-delta updates. Workaround (2014) is to remember the information, and do the adds / removes after the fixups. The information to be remembered is: 1) the View reference (a ref to the FSIndexRepository a) for each of these, the list of FSaddrs to be added or removed The list of FSaddrs ought to be a set with no duplicates, but because it could be sourced from a hand-edited source, we cannot depend on that so we store the list as a "set" to prevent duplicates. The remove operation only removes 1 instance (in case multiple instances of the same FS are in the indexes). Currently only used by XMI deserialization Constructor - done by caller - constructs IdentityHashMap
-
-
Constructor Summary
Constructors Constructor Description DeferredIndexUpdates()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addTodo(FSIndexRepositoryImpl ir, TOP fs)
(package private) java.util.List<TOP>
getTodos(FSIndexRepositoryImpl ir)
Does just-in-time creation of PositiveIntSet if needed before adding-
Methods inherited from class java.util.IdentityHashMap
clear, clone, containsKey, containsValue, entrySet, equals, forEach, get, hashCode, isEmpty, keySet, put, putAll, remove, replaceAll, size, values
-
-
-
-
Method Detail
-
addTodo
void addTodo(FSIndexRepositoryImpl ir, TOP fs)
-
getTodos
java.util.List<TOP> getTodos(FSIndexRepositoryImpl ir)
Does just-in-time creation of PositiveIntSet if needed before adding- Parameters:
ir
-fsAddr
-
-
-