Important: | When you lock an entry or data store using this service, you must release the lock by using a put (pub.storage:put) or an explicit unlock (pub.storage:unlock). If you do not release the lock, other threads will not be able to access the resource until Integration Server automatically releases the lock after the amount of time specified on the watt.server.storage.lock.maxDuration parameter has passed. |
Important: | Be careful when releasing locks with the pub.storage:unlock service. If you release a lock on a data store, another thread can obtain a lock on the data store and delete it, and the entries it contains, even if your thread still has locks on one or more of the entries. |
storeName | String Name of the data store containing the entry. | |
key | String Optional. Key of the entry that you want to lock. If key is not supplied and you request: A shared lock, the service obtains a shared lock on the data store, allowing other threads to read and modify entries, but not to delete them. An exclusive lock, the service obtains an exclusive lock on the data store, preventing other threads from locking the data store and the entries, thereby preventing those threads from reading, modifying, or deleting the entries or the data store. If both storeName and key are specified and you request: A shared lock, the service obtains a shared lock on the data store and the entry. An exclusive lock, the service obtains a shared lock on the data store and an exclusive lock on the entry. | |
waitLength | String Optional. Length of time, in milliseconds, that you want to wait for this entry to become available if it is already locked by another thread. The default is the default Maximum Lock Wait value, which is specified on the watt.server.storage.lock.maxWait property. You can update this property by using the Settings > Extended Settings screen on the Integration Server Administrator. | |
lockMode | String Optional. Type of lock you want to place on the entry or data store. Set to: Exclusive to prevent other threads from obtaining a lock on the data store or entry. An exclusive lock on an entry allows you to modify the entry, and prevents other threads from reading or modifying the entry. An exclusive lock on a data store also locks the entries in the data store. In addition, an exclusive lock on a data store allows you to delete the data store. Read is obsolete. If this value is specified, the service obtains a shared lock. Share to prevent other threads from obtaining an exclusive lock on an entry or a data store. A shared lock on an entry allows you to read, but not modify, the entry. A shared lock on a data store prevents another thread from deleting the data store. This is the default. |