Package com.luciad.ogc.wfs
Class TLcdWFSLockManager
java.lang.Object
com.luciad.ogc.wfs.TLcdWFSLockManager
A manager which enables management of locks.
This lock manager uses
ILcdWFSLockFactory to create locks.
Custom lock factory implementations can be inserted through the factory method
ALcdOGCWFSCommandDispatcherFactory.createLockFactory(ILcdWFSFilteredModelFactory).- Since:
- 10.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateLock(TLcdWFSRequestContext aContext) If a validALcdWFSLockcan be created for the request associated withaContext.createLock(long aExpiry) Creates a new lock with the given expiry time.Returns the lock with the given id ornullin casenullis supplied.voidreleaseLock(ALcdWFSLock aLock) Releases the given lock and unlocks all features which it currently locks.
-
Method Details
-
canCreateLock
If a validALcdWFSLockcan be created for the request associated withaContext. This can depend on if locking is enabled or not for a service. The default implementation always returnstrue.- Parameters:
aContext- A context object containing information about the request for which the handler should be created.- Returns:
- If a valid
ALcdWFSLockthat can be created for the request associated withaContext. - Since:
- 2024.1
-
createLock
Creates a new lock with the given expiry time. This method also performs a review of existing locks managed by this lock manager. All locks that are no longervalidarereleased.- Parameters:
aExpiry- an expiry time in seconds.- Returns:
- a new lock.
-
releaseLock
Releases the given lock and unlocks all features which it currently locks. The given lock can no longer be used after this method has been called.- Parameters:
aLock- the lock to release.
-
getLock
Returns the lock with the given id ornullin casenullis supplied. If the given id is notnullbut it does not exist in this lock manager, aTLcdWFSServiceExceptionis thrown. In all cases, a review of existing locks managed by this lock manager is done. All locks that are no longervalidarereleased.- Parameters:
aLockId- a valid lock id ornull- Returns:
- the
ALcdWFSLockthat corresponds to the given lock id ornullif the given lock id isnull - Throws:
TLcdWFSServiceException- if no lock could be found for the given lock id.
-