On 02.12.2017, at 04:06, Marshall Schor <[email protected]> wrote:
> 
>> WebAnno doesn't make use of the unreferenced FSes - there is no problem
>> if they are GCed. However, WebAnno relies on the fact that for v2 CASes
>> stored/loaded using CasCompleteSerializer have stable addresses/IDs.
>> 
>> The following should be possible:
>> 
>> * create a FS in the CAS
>> * let X be the ID of the FS
>> * save CAS to file
>> * load CAS to memory
>> * get the FS from the CAS via X
> This could be made to work, but as I've said before, it would prevent future
> GC's from happening on the loaded FSs, should some updates occur which made 
> them
> unreachable.
> 
> Is this acceptable?

That is completely acceptable. Although, wouldn't the use of weak references
be a way to allow the FSes to be looked up by ID and still be GCed?

> I don't think I'd want this as the "normal" mode of deserialization.  Perhaps 
> we
> could have some kind of a -Duima.xxxx flag that turned on this mode for those
> cases which needed it. 

That would be an option. Personally, I'd favor a local configuration option for
this in the deserializer, but the default value of that could be controlled
via a global property.

Cheers,

-- Richard

Reply via email to