Language

Cache.Unlock Method (String, LockHandle)

[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.

Namespace: System.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)

Syntax

'Declaration
Public Function Unlock ( _
    key As String, _
    lockHandle As LockHandle _
) As Boolean
'Usage
Dim instance As Cache
Dim key As String
Dim lockHandle As LockHandle
Dim returnValue As Boolean

returnValue = instance.Unlock(key, lockHandle)
public bool Unlock (
    string key,
    LockHandle lockHandle
)
public:
bool Unlock (
    String^ key, 
    LockHandle lockHandle
)
public boolean Unlock (
    String key, 
    LockHandle lockHandle
)
public function Unlock (
    key : String, 
    lockHandle : LockHandle
) : boolean

Parameters

  • 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.

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. For more information, see Expiration and Eviction (Velocity).

See Also

Reference

Cache Class
Cache Members
System.Data.Caching Namespace