Interface MMKVHandler

  • All Implemented Interfaces:

    
    public interface MMKVHandler
    
                        

    Unified callback handler for MMKV. Callback is called on the operating thread of the MMKV instance.

    • Constructor Detail

    • Method Detail

      • wantLogRedirecting

         abstract boolean wantLogRedirecting()
        Returns:

        Return False if you don't want log redirecting.

      • 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

        Returns:

        a native log handler with signature of void log(int level, const char *file, int line, const char *function, const char *message) return 0 to indicate no native handler

      • wantContentChangeNotification

         boolean wantContentChangeNotification()
        Returns:

        Return true if you want inter-process content change notification.

      • onMMKVContentLoadSuccessfully

         void onMMKVContentLoadSuccessfully(String mmapID)

        Called when an MMKV file is loaded successfully.

        Parameters:
        mmapID - The unique ID of the loaded MMKV instance.