Package com.tencent.mmkv
Enum MMKVRecoverStrategic
- java.lang.Object
-
- java.lang.Enum<MMKVRecoverStrategic>
-
- com.tencent.mmkv.MMKVRecoverStrategic
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MMKVRecoverStrategic>,java.lang.constant.Constable
public enum MMKVRecoverStrategic extends java.lang.Enum<MMKVRecoverStrategic>
The recover strategic of MMKV on errors.MMKV.registerHandler(com.tencent.mmkv.MMKVHandler)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description OnErrorDiscardThe default strategic is to discard everything on errors.OnErrorRecoverThe recover strategic will try to recover as much data as possible.
-
Method Summary
Modifier and Type Method Description static MMKVRecoverStrategicvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MMKVRecoverStrategic[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OnErrorDiscard
public static final MMKVRecoverStrategic OnErrorDiscard
The default strategic is to discard everything on errors.
-
OnErrorRecover
public static final MMKVRecoverStrategic OnErrorRecover
The recover strategic will try to recover as much data as possible.
-
-
Method Detail
-
values
public static MMKVRecoverStrategic[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MMKVRecoverStrategic valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-