Following along here:

> Adding an extra isClosing field to DiffTransactionState seems the cleanest
> approach.
>

Using this method, we give the writer in DiffTransactionState the
transaction.
This transaction gives the lock writer the correct authorizations to pass
the checks
The isClosing field is then accessed by the diff writer. If set to true,
the diffwriter doesn't write anything

Based on the implementation, it looks like it might be better to put the
isClosing field in ContentState:
 - The diff writer (DiffContentFeatureWriter) can access the Diff, the
ContentState, and the DataStore, but not the DiffTransactionState
 - DiffTransactionState can access the Diff and the ContentState, but
cannot directly access the diff writer.
 - The ContentState is unique to the transaction, and stores state info, so
is at least somewhat appropriate for such a flag

If this implementation is a bad idea for some reason, please tell me - I am
still not entirely familiar with how Diffs, Transactions, and Locking
behave and interact in geotools.
If there is a better place to put this flag where it can be set by
DiffTransactionState and still accessed by DiffContentFeatureWriter then I
am open to suggestions.

Torben
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to