Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Releases locked objects. This method supports pessimistic concurrency by making sure that the appropriate LockHandle is used for unlocking the object. Additionally, this overload allows you to specify an object time-out that overrides the default settings for the cache.
Namespace: System.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)
Syntax
'Declaration
Public Function Unlock ( _
region As String, _
key As String, _
lockHandle As LockHandle, _
timeOut As TimeSpan _
) As Boolean
'Usage
Dim instance As Cache
Dim region As String
Dim key As String
Dim lockHandle As LockHandle
Dim timeOut As TimeSpan
Dim returnValue As Boolean
returnValue = instance.Unlock(region, key, lockHandle, timeOut)
public bool Unlock (
string region,
string key,
LockHandle lockHandle,
TimeSpan timeOut
)
public:
bool Unlock (
String^ region,
String^ key,
LockHandle lockHandle,
TimeSpan timeOut
)
public boolean Unlock (
String region,
String key,
LockHandle lockHandle,
TimeSpan timeOut
)
public function Unlock (
region : String,
key : String,
lockHandle : LockHandle,
timeOut : TimeSpan
) : boolean
Parameters
- region
The name of the region. Use DefaultRegion if the object is not stored in a region.
- key
The unique value that is used to identify the object in the region or cache. If this parameter is null, an exception is thrown.
- lockHandle
The LockHandle object corresponding to the lock on the cached object.
- timeOut
A non-zero time to live (TTL) value that is used to specify how many minutes the object should reside in the cache before expiration.
Return Value
True, if successful; false if unsuccessful.
Remarks
The lockHandle parameter is required and must match the LockHandle of the locked object to succeed. For more information about concurrency, see Concurrency Models (Velocity) and Concurrency Methods (Velocity).
Locked objects are never expired, but they may expire immediately if unlocked after their expiration time; this may be prevented by using the timeOut parameter. The timeOut value associated with the cached object overrides expiration settings specified in the named cache configuration. For more information, see Expiration and Eviction (Velocity).