Integration Server 10.5 | Built-In Services Reference Guide | Cache Folder | Summary of Elements in this Folder | pub.cache.atomic:replace
 
pub.cache.atomic:replace
WmPublic. Replaces the cached element value with the supplied value.
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 value you want to replace. This parameter is case sensitive.
key
Object Key of the cache element whose value you want to replace.
oldValue
Object Value of the cached element.
newValue
Object Value with which to replace the value of the cached element.
Output Parameters
replaced
String Indicates whether the service replaced oldValue with newValue in the cache.
*true indicates that the value was replaced in the cache.
*false indicates that the value was not replaced in the cache.
Usage Notes
The pub.cache.atomic:replace service replaces an element in the cache only if an element with the values of the specified key and oldValue parameters already exist in the cache. If an element exist in the cache with the specified key and oldValue, pub.cache.atomic:replace replaces the cached element with the specified key and newValue.
Integration Server issues a ServiceException in the following cases:
*If you do not specify all required input parameters.
*If Integration Server cannot find the specified cache manager or cache.
*If a cache operation fails.