Package org.apache.uima.cas.impl
Class BinaryCasSerDes.BinDeserSupport
java.lang.Object
org.apache.uima.cas.impl.BinaryCasSerDes.BinDeserSupport
- Enclosing class:
BinaryCasSerDes
Binary Deserialization Support An instance of this class is made for every reinit operation
doing delta deserialization Mainly used to convert addrs into the main heap into their
corresponding FS info
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private TOP
private int
The current end address (1 beyond last slot)private int[]
An array of all the starting indexes of the FSs on the old/prev heap (below the mark, for delta CAS, plus one last one (one beyond the end)private int
index into fssAddrArrayprivate int
The current start address for an FS having maybe multiple fields updatedprivate TOP
private FSsTobeAddedback
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
findCorrespondingFs
(int heapAddr, Int2ObjHashMap<TOP, TOP> addr2fs) Given a heap addr which may be in the middle of a FS, find the FS it belongs to and set up things in the bds.private void
add a previously removed fs backprivate void
maybeAddBackAndRemoveFs
(int heapAddr, Int2ObjHashMap<TOP, TOP> addr2fs) for Deserialization of Delta, when updating existing FSs, If the heap addr is for the next FS, re-add the previous one to those indexes where it was removed, and then maybe remove the new one (and remember which views to re-add to).private void
maybeRemove
(int heapAddr) if not an array (array values can't be keys) remove if the feature being updated is in an index key
-
Field Details
-
fs
-
fsStartAddr
private int fsStartAddrThe current start address for an FS having maybe multiple fields updated -
fsEndAddr
private int fsEndAddrThe current end address (1 beyond last slot) -
fssAddrArray
private int[] fssAddrArrayAn array of all the starting indexes of the FSs on the old/prev heap (below the mark, for delta CAS, plus one last one (one beyond the end) -
fssIndex
private int fssIndexindex into fssAddrArray -
addrOfFsToBeAddedBack
private int addrOfFsToBeAddedBack -
fsToBeAddedBack
-
tobeAddedback
-
-
Constructor Details
-
BinDeserSupport
private BinDeserSupport()
-
-
Method Details
-
maybeAddBack
private void maybeAddBack()add a previously removed fs back -
addBackIfRemoved
private void addBackIfRemoved() -
maybeRemove
private void maybeRemove(int heapAddr) if not an array (array values can't be keys) remove if the feature being updated is in an index key- Parameters:
heapAddr
- -
-
maybeAddBackAndRemoveFs
for Deserialization of Delta, when updating existing FSs, If the heap addr is for the next FS, re-add the previous one to those indexes where it was removed, and then maybe remove the new one (and remember which views to re-add to).- Parameters:
heapAddr
-
-
findCorrespondingFs
Given a heap addr which may be in the middle of a FS, find the FS it belongs to and set up things in the bds. Special cases: if the addr is in the middle of an already setup FS, just return The search is done using a binary search, with an exception to check the next item (optimization)- Parameters:
heapAddr
- - the heap addrbds
- -
-