Note: This API is now obsolete.
Gets a document and locks it for a specified time period as an asynchronous operation.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 0.0.0.0 (0.0.0.0)
Syntax[ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")]
public Task<IOperationResult<T>> GetWithLockAsync<T>(
string key,
TimeSpan expiration
)
[ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")]
public Task<IOperationResult<T>> GetWithLockAsync<T>(
string key,
TimeSpan expiration
)
<ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")>
Public Function GetWithLockAsync(Of T) (
key As String,
expiration As TimeSpan
) As Task(Of IOperationResult(Of T))
<ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")>
Public Function GetWithLockAsync(Of T) (
key As String,
expiration As TimeSpan
) As Task(Of IOperationResult(Of T))
public:
[ObsoleteAttribute(L"NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")]
generic<typename T>
virtual Task<IOperationResult<T>^>^ GetWithLockAsync(
String^ key,
TimeSpan expiration
) sealed
public:
[ObsoleteAttribute(L"NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")]
generic<typename T>
virtual Task<IOperationResult<T>^>^ GetWithLockAsync(
String^ key,
TimeSpan expiration
) sealed
[<ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")>]
abstract GetWithLockAsync :
key : string *
expiration : TimeSpan -> Task<IOperationResult<'T>>
[<ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")>]
override GetWithLockAsync :
key : string *
expiration : TimeSpan -> Task<IOperationResult<'T>>
[<ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")>]
abstract GetWithLockAsync :
key : string *
expiration : TimeSpan -> Task<IOperationResult<'T>>
[<ObsoleteAttribute("NCBC-1146: GetWithLockAsync has been renamed to GetAndLockAsync.")>]
override GetWithLockAsync :
key : string *
expiration : TimeSpan -> Task<IOperationResult<'T>>
Parameters
- key
- Type: System.String
The key of the document to retrieve.
- expiration
- Type: System.TimeSpan
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, TimeSpan)
See Also