Integration Server 10.5 | Built-In Services Reference Guide | Storage Folder | Summary of Elements in this Folder | pub.storage:get
 
pub.storage:get
WmPublic. Retrieves a value from a data store and locks the entry and the data store on behalf of the thread that invoked the service.
Important:
This service does not automatically release the lock on the data store or entry after performing the get operation, so you need to make sure the lock is released by calling the pub.storage:put or pub.storage:unlock service. 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 property has passed.
Input Parameters
storeName
String Name of the data store from which you want to retrieve the entry.
key
String Key of the entry whose value you want to retrieve.
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. Set to:
*Exclusive to prevent other threads from reading or updating the entry while you are using it. The service also obtains a shared lock on the data store. An exclusive lock on an entry allows you to modify the entry.
*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 the entry. The service also obtains a shared lock on the data store. A shared lock on an entry allows you to read, but not modify, the entry. This is the default.
Output Parameters
value
Document Retrieved entry (IData object). If the requested entry does not exist, the value of this parameter is null.
Usage Notes
If you request an exclusive lock and the service finds a shared lock from the same thread on the entry, the service will automatically promote the shared lock on the entry to an exclusive lock.
When this service locks an entry, it also acquires a shared lock on the associated data store to prevent another thread from deleting the data store, and the entries it contains, while your thread has the entry locked.
When storing and retrieving the flow state in the short-term store for checkpoint restart purposes, be sure the value of key is unique to the transaction.