Gets a document and locks it for a specified time period.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntaxpublic IOperationResult<T> GetWithLock<T>(
string key,
TimeSpan expiration
)
public IOperationResult<T> GetWithLock<T>(
string key,
TimeSpan expiration
)
Public Function GetWithLock(Of T) (
key As String,
expiration As TimeSpan
) As IOperationResult(Of T)
Public Function GetWithLock(Of T) (
key As String,
expiration As TimeSpan
) As IOperationResult(Of T)
public:
generic<typename T>
virtual IOperationResult<T>^ GetWithLock(
String^ key,
TimeSpan expiration
) sealed
public:
generic<typename T>
virtual IOperationResult<T>^ GetWithLock(
String^ key,
TimeSpan expiration
) sealed
abstract GetWithLock :
key : string *
expiration : TimeSpan -> IOperationResult<'T>
override GetWithLock :
key : string *
expiration : TimeSpan -> IOperationResult<'T>
abstract GetWithLock :
key : string *
expiration : TimeSpan -> IOperationResult<'T>
override GetWithLock :
key : string *
expiration : TimeSpan -> 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:
IOperationResult<T>
An
IOperationResult<T> with the value.
Implements
IBucket.GetWithLock<T>(String, TimeSpan)
See Also