-
public interface MMKVHandlerUnified callback handler for MMKV. Callback is called on the operating thread of the MMKV instance.
-
-
Method Summary
Modifier and Type Method Description abstract MMKVRecoverStrategiconMMKVCRCCheckFail(String mmapID)By default MMKV will discard all data on crc32-check failure. abstract MMKVRecoverStrategiconMMKVFileLengthError(String mmapID)By default MMKV will discard all data on file length mismatch. abstract booleanwantLogRedirecting()abstract voidmmkvLog(MMKVLogLevel level, String file, int line, String function, String message)Log Redirecting. longgetNativeLogHandler()handle the log in NDK native code booleanwantContentChangeNotification()voidonContentChangedByOuterProcess(String mmapID)Inter-process content change notification. voidonMMKVContentLoadSuccessfully(String mmapID)Called when an MMKV file is loaded successfully. -
-
Method Detail
-
onMMKVCRCCheckFail
abstract MMKVRecoverStrategic onMMKVCRCCheckFail(String mmapID)
By default MMKV will discard all data on crc32-check failure. OnErrorDiscard
- Parameters:
mmapID- The unique ID of the MMKV instance.
-
onMMKVFileLengthError
abstract MMKVRecoverStrategic onMMKVFileLengthError(String mmapID)
By default MMKV will discard all data on file length mismatch. OnErrorDiscard
- Parameters:
mmapID- The unique ID of the MMKV instance.
-
wantLogRedirecting
abstract boolean wantLogRedirecting()
-
mmkvLog
abstract void mmkvLog(MMKVLogLevel level, String file, int line, String function, 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.
-
getNativeLogHandler
long getNativeLogHandler()
handle the log in NDK native code
-
wantContentChangeNotification
boolean wantContentChangeNotification()
-
onContentChangedByOuterProcess
void onContentChangedByOuterProcess(String mmapID)
Inter-process content change notification.Triggered by any method call, such as getXXX() or setXXX() or checkContentChangedByOuterProcess.
- Parameters:
mmapID- The unique ID of the changed MMKV instance.
-
onMMKVContentLoadSuccessfully
void onMMKVContentLoadSuccessfully(String mmapID)
Called when an MMKV file is loaded successfully.
- Parameters:
mmapID- The unique ID of the loaded MMKV instance.
-
-
-
-