uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <...@uima.apache.org>
Subject [jira] [Updated] (UIMA-4677) UV3 Internal support for Feature Structure IDs
Date Fri, 02 Sep 2016 13:24:20 GMT

     [ https://issues.apache.org/jira/browse/UIMA-4677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marshall Schor updated UIMA-4677:
---------------------------------
    Description: 
Feature Structures have IDs; these show up in externalized formats.  In v2, these were the
int heap address. In V3, -these are incrementing ints, starting at 1.- these are designed
to mimic v2, for backwards compatibility.

Support is needed for PEARs and for low-level createFS methods to hold onto FSs to prevent
them from being garbage collected.  This is provided using a map from IDs to the FS.

  was:
Feature Structures have IDs; these show up in externalized formats.  In v2, these were the
int heap address.  In V3, these are incrementing ints, starting at 1.  

Support is needed (for backwards compatibility, and perhaps other uses) to go from an "id"
to the Java Feature Structure.  The id's are dense, except for those which might be reclaimed
by the garbage collector.  We support the reverse map from ids to Feature Structures using
a list of Feature Structures, kept in creation order.  Since IDs continually increment, all
addition is done at the end. 

To allow garbage collection to work, this table references the Feature Structures via WeakReferences.
 -The table supports also a version where GC for Feature Structures is disabled; this might
be needed for some applications where users held onto low level ints and expected to be able
to get the Feature Structures from them, even if they weren't reachable via some non-GC'd
Java Object.-

-When operated in gc-enabled mode, the binary search to find an element is modified to skip
any WeakReferences whose data has been garbage collected.  Furthermore, the table is reorganized
occasionally to reclaim no-longer-used WeakReference.-

The table is a simple ArrayList; it is reset when the cas is reset.  The above crossed-out
optimizations are not used.


> UV3 Internal support for Feature Structure IDs
> ----------------------------------------------
>
>                 Key: UIMA-4677
>                 URL: https://issues.apache.org/jira/browse/UIMA-4677
>             Project: UIMA
>          Issue Type: Sub-task
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 3.0.0SDKexp
>
>
> Feature Structures have IDs; these show up in externalized formats.  In v2, these were
the int heap address. In V3, -these are incrementing ints, starting at 1.- these are designed
to mimic v2, for backwards compatibility.
> Support is needed for PEARs and for low-level createFS methods to hold onto FSs to prevent
them from being garbage collected.  This is provided using a map from IDs to the FS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message