Gets a document and locks it for a specified time period.
Namespace: Couchbase.CoreAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.1.0.0 (2.1.0.0)
Syntax IOperationResult<T> GetWithLock<T>(
string key,
uint expiration
)
IOperationResult<T> GetWithLock<T>(
string key,
uint expiration
)
Function GetWithLock(Of T) (
key As String,
expiration As UInteger
) As IOperationResult(Of T)
Function GetWithLock(Of T) (
key As String,
expiration As UInteger
) As IOperationResult(Of T)
generic<typename T>
IOperationResult<T>^ GetWithLock(
String^ key,
unsigned int expiration
)
generic<typename T>
IOperationResult<T>^ GetWithLock(
String^ key,
unsigned int expiration
)
abstract GetWithLock :
key : string *
expiration : uint32 -> IOperationResult<'T>
abstract GetWithLock :
key : string *
expiration : uint32 -> 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:
IOperationResult T An
IOperationResult T with the value.
See Also