public enum VersionType extends Enum<VersionType>
| 列挙型定数と説明 |
|---|
EXTERNAL |
EXTERNAL_GTE |
FORCE
Warning: this version type should be used with care.
|
INTERNAL |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static VersionType |
fromString(String versionType) |
static VersionType |
fromString(String versionType,
VersionType defaultVersionType) |
static VersionType |
fromValue(byte value) |
byte |
getValue() |
abstract boolean |
isVersionConflictForReads(long currentVersion,
long expectedVersion)
Checks whether the current version conflicts with the expected version, based on the current version type.
|
abstract boolean |
isVersionConflictForWrites(long currentVersion,
long expectedVersion)
Checks whether the current version conflicts with the expected version, based on the current version type.
|
abstract long |
updateVersion(long currentVersion,
long expectedVersion)
Returns the new version for a document, based on its current one and the specified in the request
|
abstract boolean |
validateVersionForReads(long version)
validate the version is a valid value for this type when reading.
|
abstract boolean |
validateVersionForWrites(long version)
validate the version is a valid value for this type when writing.
|
static VersionType |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static VersionType[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
VersionType |
versionTypeForReplicationAndRecovery()
Some version types require different semantics for primary and replicas.
|
public static final VersionType INTERNAL
public static final VersionType EXTERNAL
public static final VersionType EXTERNAL_GTE
public static final VersionType FORCE
public static VersionType[] values()
for(VersionType c: VersionType.values()) System.out.println(c);
public static VersionType valueOf(String name)
name - 返される列挙型定数の名前。IllegalArgumentException - この列挙型に、指定した名前の定数がない場合NullPointerException - 引数がnullの場合public byte getValue()
public abstract boolean isVersionConflictForWrites(long currentVersion,
long expectedVersion)
public abstract boolean isVersionConflictForReads(long currentVersion,
long expectedVersion)
public abstract long updateVersion(long currentVersion,
long expectedVersion)
public abstract boolean validateVersionForWrites(long version)
public abstract boolean validateVersionForReads(long version)
public VersionType versionTypeForReplicationAndRecovery()
public static VersionType fromString(String versionType)
public static VersionType fromString(String versionType, VersionType defaultVersionType)
public static VersionType fromValue(byte value)
Copyright © 2009–2016. All rights reserved.