Class TransformFeatureLocking
- All Implemented Interfaces:
FeatureLocking<SimpleFeatureType,,SimpleFeature> FeatureSource<SimpleFeatureType,,SimpleFeature> FeatureStore<SimpleFeatureType,,SimpleFeature> SimpleFeatureLocking,SimpleFeatureSource,SimpleFeatureStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface FeatureLocking
FeatureLocking.Response -
Field Summary
Fields inherited from class TransformFeatureStore
invertedTransformer, storeFields inherited from class TransformFeatureSource
FF, LOGGER, source, transformer -
Constructor Summary
ConstructorsConstructorDescriptionTransformFeatureLocking(SimpleFeatureLocking locking, Name name, List<Definition> definitions) -
Method Summary
Modifier and TypeMethodDescriptionintFeatureLock all Features.intlockFeatures(Query query) FeatureLock features described by Query.intlockFeatures(Filter filter) FeatureLock features described by Filter.voidsetFeatureLock(FeatureLock lock) All locking operations will operate against the providedlock.voidUnlocks all Features.voidunLockFeatures(Query query) Unlock Features denoted by provided query.voidunLockFeatures(Filter filter) Unlock Features denoted by provided filter.Methods inherited from class TransformFeatureStore
addFeatures, getTransaction, modifyFeatures, modifyFeatures, modifyFeatures, modifyFeatures, removeFeatures, setFeatures, setTransactionMethods inherited from class TransformFeatureSource
addFeatureListener, getBounds, getBounds, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FeatureSource
addFeatureListener, getBounds, getBounds, getCount, getDataStore, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListenerMethods inherited from interface FeatureStore
addFeatures, getTransaction, modifyFeatures, modifyFeatures, removeFeatures, setFeatures, setTransactionMethods inherited from interface SimpleFeatureStore
getFeatures, getFeatures, getFeatures, modifyFeatures, modifyFeatures
-
Constructor Details
-
TransformFeatureLocking
public TransformFeatureLocking(SimpleFeatureLocking locking, Name name, List<Definition> definitions) throws IOException - Throws:
IOException
-
-
Method Details
-
setFeatureLock
Description copied from interface:FeatureLockingAll locking operations will operate against the providedlock.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:
setFeatureLockin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Parameters:
lock- FeatureLock configuration including authorization and requested duration
-
lockFeatures
Description copied from interface:FeatureLockingFeatureLock 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:
lockFeaturesin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Parameters:
query- Query describing the features to lock- Returns:
- Number of features locked
- Throws:
IOException- Thrown if anything goes wrong
-
lockFeatures
Description copied from interface:FeatureLockingFeatureLock 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:
lockFeaturesin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Parameters:
filter- Filter describing the features to lock- Returns:
- Number of features locked
- Throws:
IOException- Thrown if anything goes wrong
-
lockFeatures
Description copied from interface:FeatureLockingFeatureLock all Features.The method does not prevent addFeatures() from being used (we could add a lockDataSource() method if this functionality is required.
- Specified by:
lockFeaturesin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Returns:
- Number of Features locked by this opperation
- Throws:
IOException
-
unLockFeatures
Description copied from interface:FeatureLockingUnlocks all Features.Authorization must be provided prior before calling this method.
void releaseLock( String lockId, LockingDataSource ds ){ ds.setAuthorization( "LOCK534" ); ds.unLockFeatures(); }- Specified by:
unLockFeaturesin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Throws:
IOException
-
unLockFeatures
Description copied from interface:FeatureLockingUnlock Features denoted by provided filter.Authorization must be provided prior before calling this method.
- Specified by:
unLockFeaturesin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Throws:
IOException
-
unLockFeatures
Description copied from interface:FeatureLockingUnlock Features denoted by provided query.Authorization must be provided prior before calling this method.
- Specified by:
unLockFeaturesin interfaceFeatureLocking<SimpleFeatureType,SimpleFeature> - Parameters:
query- Specifies fatures to unlock- Throws:
IOException
-