Package org.apache.uima.cas.impl
Class DeferredIndexUpdates
java.lang.Object
java.util.AbstractMap<K,V>
java.util.IdentityHashMap<FSIndexRepositoryImpl,PositiveIntSet>
org.apache.uima.cas.impl.DeferredIndexUpdates
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<FSIndexRepositoryImpl,
PositiveIntSet>
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addTodo
(FSIndexRepositoryImpl ir, int fsAddr) (package private) PositiveIntSet
Does just-in-time creation of PositiveIntSet if needed before addingMethods inherited from class java.util.IdentityHashMap
clear, clone, containsKey, containsValue, entrySet, equals, forEach, get, hashCode, isEmpty, keySet, put, putAll, remove, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, getOrDefault, merge, putIfAbsent, remove, replace, replace
-
Constructor Details
-
DeferredIndexUpdates
DeferredIndexUpdates()
-
-
Method Details
-
addTodo
-
getTodos
Does just-in-time creation of PositiveIntSet if needed before adding- Parameters:
ir
-fsAddr
-
-