Package com.tencent.mmkv
Interface MMKVHandler
-
public interface MMKVHandlerCallback handler for MMKV. Callback is called on the operating thread of the MMKV instance.
-
-
Method Summary
Modifier and Type Method Description voidmmkvLog(MMKVLogLevel level, java.lang.String file, int line, java.lang.String function, java.lang.String message)Log Redirecting.MMKVRecoverStrategiconMMKVCRCCheckFail(java.lang.String mmapID)By default MMKV will discard all data on crc32-check failure.MMKVRecoverStrategiconMMKVFileLengthError(java.lang.String mmapID)By default MMKV will discard all data on file length mismatch.booleanwantLogRedirecting()
-
-
-
Method Detail
-
onMMKVCRCCheckFail
MMKVRecoverStrategic onMMKVCRCCheckFail(java.lang.String mmapID)
By default MMKV will discard all data on crc32-check failure.MMKVRecoverStrategic.OnErrorDiscard- Parameters:
mmapID- The unique ID of the MMKV instance.- Returns:
- Return
MMKVRecoverStrategic.OnErrorRecoverto recover any data on the file.
-
onMMKVFileLengthError
MMKVRecoverStrategic onMMKVFileLengthError(java.lang.String mmapID)
By default MMKV will discard all data on file length mismatch.MMKVRecoverStrategic.OnErrorDiscard- Parameters:
mmapID- The unique ID of the MMKV instance.- Returns:
- Return
MMKVRecoverStrategic.OnErrorRecoverto recover any data on the file.
-
wantLogRedirecting
boolean wantLogRedirecting()
- Returns:
- Return False if you don't want log redirecting.
-
mmkvLog
void mmkvLog(MMKVLogLevel level, java.lang.String file, int line, java.lang.String function, java.lang.String message)
Log Redirecting.- Parameters:
level- The level of this log.file- The file name of this log.line- The line of code of this log.function- The function name of this log.message- The content of this log.
-
-