Class EventContentFeatureWriter

  • All Implemented Interfaces:
    Closeable, AutoCloseable, FeatureWriter<SimpleFeatureType,​SimpleFeature>

    public class EventContentFeatureWriter
    extends Object
    implements FeatureWriter<SimpleFeatureType,​SimpleFeature>
    FeatureWriter wrapper that issues events modifications as required.

    It is the responsibility of a FeatureStore to issue events to interested parties as content is modified. The ContentState keeps track of the listeners, while EventContentFeatureWriter is willing to fire the events as needed.

    Event generation happens in two passes:

    • As features are modified events are sent out one at a time
    • When commit() or rollback() is called a "batch" event is sent out
    The only trick is the comment() event contains our only indication of the final FeatureIDs generated for new features. The BatchFeatureEvent maintains a map of BEFORE/AFTER values allowing any interested party to update their seleciton.

    Please note that if you are using DiffFeatureWriter it sends out events on its own.

    Jody Garnett (LISASoft)