Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class OperationResult

The result of an operation.

Inheritance
object
OperationResult
OperationResult<T>
DocumentFragment<TDocument>
Implements
IOperationResult
IResult
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.Core.IO.Operations
Assembly: Couchbase.NetClient.dll
Syntax
[Obsolete("This class is not required and will be removed in a future release.")]
public class OperationResult : IOperationResult, IResult
Remarks

If Success is false, use the Message property to help determine the reason.

Constructors

View Source

OperationResult()

Declaration
public OperationResult()

Properties

View Source

Cas

The 'Check and Set' or 'CAS' value for enforcing optimistic concurrency.

Declaration
public ulong Cas { get; set; }
Property Value
Type Description
ulong
View Source

Durability

The level of durability that the operation achieved

Declaration
public Durability Durability { get; set; }
Property Value
Type Description
Durability
View Source

Exception

If Success is false and an exception has been caught internally, this field will contain the exception.

Declaration
public Exception? Exception { get; set; }
Property Value
Type Description
Exception
View Source

Id

Gets the id or key for the document.

Declaration
public string? Id { get; }
Property Value
Type Description
string

The identifier.

View Source

Message

If Success is false, the reason why the operation failed.

Declaration
public string? Message { get; }
Property Value
Type Description
string
View Source

OpCode

Gets the OpCode for the operation.

Declaration
public OpCode OpCode { get; }
Property Value
Type Description
OpCode

The op code.

View Source

Status

The status returned from the Couchbase Server after an operation.

Declaration
public ResponseStatus Status { get; }
Property Value
Type Description
ResponseStatus
Remarks

Success will be returned if Success is true, otherwise Success will be false. If ClientFailure is returned, then the operation failed before being sent to the Couchbase Server.

View Source

Success

True if the operation succeeded.

Declaration
public bool Success { get; }
Property Value
Type Description
bool
Remarks

If Success is false, use the Message property to help determine the reason.

View Source

Token

Gets the mutation token for the operation if enhanced durability is enabled.

Declaration
public MutationToken? Token { get; }
Property Value
Type Description
MutationToken

The mutation token.

Methods

View Source

IsNmv()

Checks if the server responded with a Not My Vbucket.

Declaration
public bool IsNmv()
Returns
Type Description
bool

Returns true if ResponseStatus is a VBucketBelongsToAnotherServer.

View Source

ShouldRetry()

If the response indicates the request is retryable, returns true.

Declaration
public bool ShouldRetry()
Returns
Type Description
bool
Remarks

Intended for internal use only.

View Source

ToString()

Returns a string that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
object.ToString()

Implements

IOperationResult
IResult
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.