Gets a document and locks it for a specified time period as an asynchronous operation.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.1.0.0 (2.1.0.0)
Syntax public Task<IOperationResult<T>> GetWithLockAsync<T>(
string key,
uint expiration
)
public Task<IOperationResult<T>> GetWithLockAsync<T>(
string key,
uint expiration
)
Public Function GetWithLockAsync(Of T) (
key As String,
expiration As UInteger
) As Task(Of IOperationResult(Of T))
Public Function GetWithLockAsync(Of T) (
key As String,
expiration As UInteger
) As Task(Of IOperationResult(Of T))
public:
generic<typename T>
virtual Task<IOperationResult<T>^>^ GetWithLockAsync(
String^ key,
unsigned int expiration
) sealed
public:
generic<typename T>
virtual Task<IOperationResult<T>^>^ GetWithLockAsync(
String^ key,
unsigned int expiration
) sealed
abstract GetWithLockAsync :
key : string *
expiration : uint32 -> Task<IOperationResult<'T>>
override GetWithLockAsync :
key : string *
expiration : uint32 -> Task<IOperationResult<'T>>
abstract GetWithLockAsync :
key : string *
expiration : uint32 -> Task<IOperationResult<'T>>
override GetWithLockAsync :
key : string *
expiration : uint32 -> Task<IOperationResult<'T>>
Parameters
- key
- Type: System String
The key of the document to retrieve.
- expiration
- Type: System UInt32
The seconds until the document is unlocked. The default is 15 seconds and the maximum supported by the server is 30 seconds.
Type Parameters - T
- The Type of the values to be returned.
Return Value
Type:
Task IOperationResult T
The
Task TResult object representing the asynchronous operation.
Implements
IBucket GetWithLockAsync T (String, UInt32)See Also