Application Integration (On-Premises) : Integration Server Built-In Services : Cache Folder : pub.cache.lock:acquireLock
pub.cache.lock:acquireLock
WmPublic. Acquires a lock on the cached element that contains the specified key.
Input Parameters
cacheManagerName
String Name of the cache manager that manages the cache. This parameter is case sensitive.
cacheName
String Name of the cache that contains the element to lock. This parameter is case sensitive.
key
Object Key of the cached element to lock.
lockType
String Optional. Type of lock you want to place on the cached element.
Key
Description
read
Places a read lock on the key. This is the default.
write
Places a write lock on the key.
lockWaitTime
String Optional. Amount of time in milliseconds to wait to acquire a lock before timing out.
Key
Description
Any integer less than 0
The service waits indefinitely until it acquires a lock.
0
The service fails if it is unable to acquire the lock immediately. This is the default.
Any integer greater than 0
The service fails if it is unable to acquire the lock within the specified time.
Output Parameters
None.
Usage Notes
If the pub.cache.lock:acquireLock service acquires a lock, the element remains locked until released with the pub.cache.lock:releaseLock service.
You must acquire and release a lock in the same thread in which pub.cache.lock:acquireLock is executing. Failing to do so could cause the key to remain locked indefinitely.
When using the debug flow service to step through a flow service, depending on your breakpoint settings Designer might use a new thread for each step. You cannot release a lock acquired in a previous step of the same flow if break points are triggered on Designer or if you are stepping through a flow service. To avoid orphaned locks, disable invocations of pub.cache.lock:acquireLock and pub.cache.lock:releaseLock before stepping through the flow service or make sure that pub.cache.lock:acquireLock and pub.cache.lock:releaseLock services are called between the boundaries of two breakpoints.
Integration Server issues a ServiceException in the following cases:
*If you do not specify all required input parameters.
*Whether or not a cached element needs to be locked depends on the application that is using the element. For example, if an application retrieves and holds an element for a time and needs to prevent another client from changing the element during this time, the application should acquire a lock on the element. However, if the application does not hold the element, a lock might not be required.
*If Integration Server cannot find the specified cache manager or cache.
*If pub.cache.lock:acquireLock is unable to acquire a lock.
*If the specified lockWaitTime is not a valid integer.
*If a cache operation fails.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback