Note: This API is now obsolete.
Gets a document and locks it for a specified time period.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 0.0.0.0 (0.0.0.0)
Syntax[ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")]
public IOperationResult<T> GetWithLock<T>(
string key,
uint expiration
)
[ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")]
public IOperationResult<T> GetWithLock<T>(
string key,
uint expiration
)
<ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")>
Public Function GetWithLock(Of T) (
key As String,
expiration As UInteger
) As IOperationResult(Of T)
<ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")>
Public Function GetWithLock(Of T) (
key As String,
expiration As UInteger
) As IOperationResult(Of T)
public:
[ObsoleteAttribute(L"NCBC-1146: GetWithLock has been renamed to GetAndLock.")]
generic<typename T>
virtual IOperationResult<T>^ GetWithLock(
String^ key,
unsigned int expiration
) sealed
public:
[ObsoleteAttribute(L"NCBC-1146: GetWithLock has been renamed to GetAndLock.")]
generic<typename T>
virtual IOperationResult<T>^ GetWithLock(
String^ key,
unsigned int expiration
) sealed
[<ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")>]
abstract GetWithLock :
key : string *
expiration : uint32 -> IOperationResult<'T>
[<ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")>]
override GetWithLock :
key : string *
expiration : uint32 -> IOperationResult<'T>
[<ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")>]
abstract GetWithLock :
key : string *
expiration : uint32 -> IOperationResult<'T>
[<ObsoleteAttribute("NCBC-1146: GetWithLock has been renamed to GetAndLock.")>]
override 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.
Implements
IBucket.GetWithLock<T>(String, UInt32)
RemarksExpirations exceeding 30 seconds will be defaulted to 15 seconds.
RemarksAn expiration of 0 is treated as an infinite.
See Also