枚举 CacheConcurrencyStrategy
- java.lang.Object
-
- java.lang.Enum<CacheConcurrencyStrategy>
-
- org.hibernate.annotations.CacheConcurrencyStrategy
-
- 所有已实现的接口:
Serializable,Comparable<CacheConcurrencyStrategy>
public enum CacheConcurrencyStrategy extends Enum<CacheConcurrencyStrategy>
Cache concurrency strategy.- 作者:
- Emmanuel Bernard
-
-
枚举常量概要
枚举常量 枚举常量 说明 NONEIndicates no concurrency strategy should be applied.NONSTRICT_READ_WRITEIndicates that the non-strict read-write strategy should be applied.READ_ONLYIndicates that read-only strategy should be applied.READ_WRITEIndicates that the read-write strategy should be applied.TRANSACTIONALIndicates that the transaction strategy should be applied.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static CacheConcurrencyStrategyfromAccessType(AccessType accessType)Conversion fromAccessTypetoCacheConcurrencyStrategy.static CacheConcurrencyStrategyparse(String name)Parse an external representation of a CacheConcurrencyStrategy value.AccessTypetoAccessType()Get the AccessType corresponding to this concurrency strategy.static CacheConcurrencyStrategyvalueOf(String name)返回带有指定名称的该类型的枚举常量。static CacheConcurrencyStrategy[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
NONE
public static final CacheConcurrencyStrategy NONE
Indicates no concurrency strategy should be applied.
-
READ_ONLY
public static final CacheConcurrencyStrategy READ_ONLY
Indicates that read-only strategy should be applied.- 另请参阅:
AccessType.READ_ONLY
-
NONSTRICT_READ_WRITE
public static final CacheConcurrencyStrategy NONSTRICT_READ_WRITE
Indicates that the non-strict read-write strategy should be applied.
-
READ_WRITE
public static final CacheConcurrencyStrategy READ_WRITE
Indicates that the read-write strategy should be applied.- 另请参阅:
AccessType.READ_WRITE
-
TRANSACTIONAL
public static final CacheConcurrencyStrategy TRANSACTIONAL
Indicates that the transaction strategy should be applied.- 另请参阅:
AccessType.TRANSACTIONAL
-
-
方法详细资料
-
values
public static CacheConcurrencyStrategy[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (CacheConcurrencyStrategy c : CacheConcurrencyStrategy.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static CacheConcurrencyStrategy valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
toAccessType
public AccessType toAccessType()
Get the AccessType corresponding to this concurrency strategy.- 返回:
- The corresponding concurrency strategy. Note that this will return
nullforNONE
-
fromAccessType
public static CacheConcurrencyStrategy fromAccessType(AccessType accessType)
Conversion fromAccessTypetoCacheConcurrencyStrategy.- 参数:
accessType- The access type to convert- 返回:
- The corresponding enum value.
NONEis returned by default if unable to recognizeaccessTypeor ifaccessTypeisnull.
-
parse
public static CacheConcurrencyStrategy parse(String name)
Parse an external representation of a CacheConcurrencyStrategy value.- 参数:
name- The external representation- 返回:
- The corresponding enum value, or
nullif not match was found.
-
-