Class TransformFeatureLocking

    • Method Detail

      • setFeatureLock

        public void setFeatureLock​(FeatureLock lock)
        Description copied from interface: FeatureLocking
        All locking operations will operate against the provided lock.

        This in in keeping with the stateful spirit of DataSource in which operations are against the "current" transaction. If a FeatureLock is not provided lock operations will only be applicable for the current transaction (they will expire on the next commit or rollback).

        That is lockFeatures() operations will:

        • Be recorded against the provided FeatureLock.
        • Be recorded against the current transaction if no FeatureLock is provided.

        Calling this method with setFeatureLock( FeatureLock.TRANSACTION ) will revert to per transaction operation.

        This design allows for the following:

        • cross DataSource FeatureLock usage
        • not having pass in the same FeatureLock object multiple times
        Specified by:
        setFeatureLock in interface FeatureLocking<SimpleFeatureType,​SimpleFeature>
        Parameters:
        lock - FeatureLock configuration including authorization and requested duration
      • lockFeatures

        public int lockFeatures​(Query query)
                         throws IOException
        Description copied from interface: FeatureLocking
        FeatureLock features described by Query.

        To implement WFS parcial Locking retrieve your features with a query operation first before trying to lock them individually. If you are not into WFS please don't ask what parcial locking is.

        Specified by:
        lockFeatures in interface FeatureLocking<SimpleFeatureType,​SimpleFeature>
        Parameters:
        query - Query describing the features to lock
        Returns:
        Number of features locked
        Throws:
        IOException - Thrown if anything goes wrong
      • lockFeatures

        public int lockFeatures​(Filter filter)
                         throws IOException
        Description copied from interface: FeatureLocking
        FeatureLock features described by Filter.

        To implement WFS partial Locking retrieve your features with a query operation first before trying to lock them individually. If you are not into WFS please don't ask what partial locking is.

        Specified by:
        lockFeatures in interface FeatureLocking<SimpleFeatureType,​SimpleFeature>
        Parameters:
        filter - Filter describing the features to lock
        Returns:
        Number of features locked
        Throws:
        IOException - Thrown if anything goes wrong