Package org.apache.uima.cas.impl
Class BinaryCasSerDes.BinDeserSupport
- java.lang.Object
-
- org.apache.uima.cas.impl.BinaryCasSerDes.BinDeserSupport
-
- Enclosing class:
- BinaryCasSerDes
private class BinaryCasSerDes.BinDeserSupport extends java.lang.Object
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
Fields Modifier and Type Field Description private int
addrOfFsToBeAddedBack
private TOP
fs
private int
fsEndAddr
The current end address (1 beyond last slot)private int[]
fssAddrArray
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
fssIndex
index into fssAddrArrayprivate int
fsStartAddr
The current start address for an FS having maybe multiple fields updatedprivate TOP
fsToBeAddedBack
private FSsTobeAddedback
tobeAddedback
-
Constructor Summary
Constructors Modifier Constructor Description private
BinDeserSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addBackIfRemoved()
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
maybeAddBack()
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 Detail
-
fs
private TOP fs
-
fsStartAddr
private int fsStartAddr
The current start address for an FS having maybe multiple fields updated
-
fsEndAddr
private int fsEndAddr
The current end address (1 beyond last slot)
-
fssAddrArray
private int[] fssAddrArray
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)
-
fssIndex
private int fssIndex
index into fssAddrArray
-
addrOfFsToBeAddedBack
private int addrOfFsToBeAddedBack
-
fsToBeAddedBack
private TOP fsToBeAddedBack
-
tobeAddedback
private FSsTobeAddedback tobeAddedback
-
-
Method Detail
-
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
private 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).- Parameters:
heapAddr
-
-
findCorrespondingFs
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. 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
- -
-
-