Class BinaryCasSerDes.BinDeserSupport

java.lang.Object
org.apache.uima.cas.impl.BinaryCasSerDes.BinDeserSupport
Enclosing class:
BinaryCasSerDes

private class BinaryCasSerDes.BinDeserSupport extends 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
     
    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 fssAddrArray
    private int
    The current start address for an FS having maybe multiple fields updated
    private TOP
     
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private 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 back
    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).
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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
  • 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

      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 addr
      bds - -