| org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest org.deegree.ogcwebservices.wfs.operation.LockFeature
LockFeature | public class LockFeature extends AbstractWFSRequest (Code) | | Represents a LockFeature request to a web feature service.
Web connections are inherently stateless. Unfortunately, this means that the semantics of
serializable transactions are not preserved. To understand the issue consider an UPDATE
operation.
The client fetches a feature instance. The feature is then modified on the client side, and
submitted back to the database, via a Transaction request for update. Serializability is lost
since there is nothing to guarantee that while the feature was being modified on the client side,
another client did not come along and update that same feature in the database.
One way to ensure serializability is to require that access to data be done in a mutually
exclusive manner; that is while one transaction accesses a data item, no other transaction can
modify the same data item. This can be accomplished by using locks that control access to the
data.
The purpose of the LockFeature interface is to expose a long term feature locking mechanism to
ensure consistency. The lock is considered long term because network latency would make feature
locks last relatively longer than native commercial database locks.
The LockFeature interface is optional and need only be implemented if the underlying datastore
supports (or can be made to support) data locking. In addition, the implementation of locking is
completely opaque to the client.
author: Andreas Poth author: Markus Schneider author: last edited by: $Author: apoth $ version: $Revision: 9345 $ |
Inner Class :public static enum ALL_SOME_TYPE | |
Constructor Summary | |
| LockFeature(String version, String id, String handle, long expiry, ALL_SOME_TYPE lockAction, List<Lock> locks) Creates a new LockFeature instance from the given parameters. |
Method Summary | |
public static LockFeature | create(String version, String id, String handle, long expiry, ALL_SOME_TYPE lockAction, List<Lock> locks) Creates a new LockFeature instance from the given parameters. | public static LockFeature | create(String id, Element root) Creates a new LockFeature instance from a document that contains the DOM
representation of the request. | public static LockFeature | create(Map<String, String> kvp) Creates a new LockFeature request from the given parameter map. | public long | getExpiry() Returns the limit on how long the web feature service holds the lock in the event that a
transaction is never issued that would release the lock. | public ALL_SOME_TYPE | getLockAction() Returns the mode for lock acquisition. | public List<Lock> | getLocks() Returns the contained lock operations. | public boolean | lockAllFeatures() Returns whether this request requires that all features have to be lockable in order to be
performed succesfully. | static ALL_SOME_TYPE | validateLockAction(String lockActionString) |
DEFAULT_EXPIRY | public static String DEFAULT_EXPIRY(Code) | | Default value for expiry (in minutes).
|
LOCK_ACTION_ALL | public static String LOCK_ACTION_ALL(Code) | | String value for
ALL_SOME_TYPE ALL_SOME_TYPE.ALL .
|
LOCK_ACTION_SOME | public static String LOCK_ACTION_SOME(Code) | | String value for
ALL_SOME_TYPE ALL_SOME_TYPE.SOME .
|
LockFeature | LockFeature(String version, String id, String handle, long expiry, ALL_SOME_TYPE lockAction, List<Lock> locks)(Code) | | Creates a new LockFeature instance from the given parameters.
Parameters: version - request version Parameters: id - id of the request Parameters: handle - handle of the request Parameters: expiry - the limit on how long the web feature service keeps the lock (in milliseconds) Parameters: lockAction - method for lock acquisition Parameters: locks - contained lock operations |
create | public static LockFeature create(String version, String id, String handle, long expiry, ALL_SOME_TYPE lockAction, List<Lock> locks)(Code) | | Creates a new LockFeature instance from the given parameters.
Parameters: version - request version Parameters: id - id of the request Parameters: handle - handle of the request Parameters: expiry - the limit on how long the web feature service holds the lock (in milliseconds) Parameters: lockAction - method for lock acquisition Parameters: locks - contained lock operations new LockFeature request |
getExpiry | public long getExpiry()(Code) | | Returns the limit on how long the web feature service holds the lock in the event that a
transaction is never issued that would release the lock. The expiry limit is specified in
milliseconds.
the limit on how long the web feature service holds the lock (in milliseconds) |
getLockAction | public ALL_SOME_TYPE getLockAction()(Code) | | Returns the mode for lock acquisition.
See Also: ALL_SOME_TYPE the mode for lock acquisition |
getLocks | public List<Lock> getLocks()(Code) | | Returns the contained lock operations.
the contained lock operations |
lockAllFeatures | public boolean lockAllFeatures()(Code) | | Returns whether this request requires that all features have to be lockable in order to be
performed succesfully.
See Also: ALL_SOME_TYPE true, if all features have to be lockable, false otherwise |
|
|