DataCacheGetAndLock Method (String, TimeSpan, DataCacheLockHandle, String, Boolean)Windows Server AppFabric Caching Compatibility Library

Note: This API is now obsolete.

Locks the cached object to prevent other clients from updating or removing it and returns the object corresponding to the key.

Namespace: Soss.Compat.WSAF
Assembly: soss_wsaf_compat (in soss_wsaf_compat.dll) Version: 1.1.0.100 (1.1.0.100)
Syntax

[ObsoleteAttribute("Individual object lock timeouts are not supported. Please use the GetAndLock method signature that does not use the lock timeout.", 
	true)]
public Object GetAndLock(
	string key,
	TimeSpan timeout,
	out DataCacheLockHandle lockHandle,
	string region,
	bool forceLock
)

Parameters

key
Type: SystemString
The unique identifier used to access the object in the cache.
timeout
Type: SystemTimeSpan
The amount of time that object remains locked.
lockHandle
Type: Soss.Compat.WSAFDataCacheLockHandle
The DataCacheLockHandle object required to unlock the object (output parameter).
region
Type: SystemString
The name of the region where the object is stored.
forceLock
Type: SystemBoolean
If forceLock is true, key is locked irrespective of key-value pair presence in cache.

Return Value

Type: Object
The object in the cache that was stored in the cache with the specified key.
Remarks

This method signature is not supported.
See Also

Reference