@Stability.Volatile public enum ConflictResolutionType extends Enum<ConflictResolutionType>
A conflict is caused when the source and target copies of an XDCR-replicated document are updated independently of and dissimilarly to one another, each by a local application. The conflict must be resolved, by determining which of the variants should prevail; and then correspondingly saving both documents in identical form. XDCR provides an automated conflict resolution process.
Enum Constant and Description |
---|
CUSTOM
Custom bucket conflict resolution.
|
SEQUENCE_NUMBER
Conflict resolution based on the "Sequence Number".
|
TIMESTAMP
Conflict resolution based on a timestamp.
|
Modifier and Type | Method and Description |
---|---|
String |
alias() |
static ConflictResolutionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConflictResolutionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConflictResolutionType TIMESTAMP
Timestamp-based conflict resolution (often referred to as Last Write Wins, or LWW) uses the document timestamp (stored in the CAS) to resolve conflicts. The timestamps associated with the most recent updates of source and target documents are compared. The document whose update has the more recent timestamp prevails.
public static final ConflictResolutionType SEQUENCE_NUMBER
Conflicts can be resolved by referring to documents' sequence numbers. Sequence numbers are maintained per document, and are incremented on every document-update. The sequence numbers of source and target documents are compared; and the document with the higher sequence number prevails.
@Stability.Volatile public static final ConflictResolutionType CUSTOM
In Couchbase Server 7.1, this feature is only available in "developer-preview" mode. See the UI XDCR settings for the custom conflict resolution properties.
public static ConflictResolutionType[] values()
for (ConflictResolutionType c : ConflictResolutionType.values()) System.out.println(c);
public static ConflictResolutionType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String alias()
Copyright © 2024 Couchbase, Inc.. All rights reserved.