forked from Tencent/MMKV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
267 additions
and
46 deletions.
There are no files selected for viewing
219 changes: 186 additions & 33 deletions
219
Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKV.java
Large diffs are not rendered by default.
Oops, something went wrong.
12 changes: 9 additions & 3 deletions
12
Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentChangeNotification.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
package com.tencent.mmkv; | ||
|
||
/** | ||
* Inter-process content change notification. | ||
* Triggered by any method call, such as getXXX() or setXXX() or {@link MMKV#checkContentChangedByOuterProcess()}. | ||
*/ | ||
public interface MMKVContentChangeNotification { | ||
|
||
// content change notification of other process | ||
// trigger by getXXX() or setXXX() or checkContentChangedByOuterProcess() | ||
/** | ||
* Inter-process content change notification. | ||
* Triggered by any method call, such as getXXX() or setXXX() or {@link MMKV#checkContentChangedByOuterProcess()}. | ||
* @param mmapID The unique ID of the changed MMKV instance. | ||
*/ | ||
void onContentChangedByOuterProcess(String mmapID); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 26 additions & 3 deletions
29
Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVLogLevel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
package com.tencent.mmkv; | ||
|
||
/** | ||
* The levels of MMKV log. | ||
*/ | ||
public enum MMKVLogLevel { | ||
LevelDebug, // not available for release/production build | ||
LevelInfo, // default level | ||
/** | ||
* Debug level. Not available for release/production build. | ||
*/ | ||
LevelDebug, | ||
|
||
/** | ||
* Info level. The default level. | ||
*/ | ||
LevelInfo, | ||
|
||
/** | ||
* Warning level. | ||
*/ | ||
LevelWarning, | ||
|
||
/** | ||
* Error level. | ||
*/ | ||
LevelError, | ||
LevelNone // special level used to disable all log messages | ||
|
||
/** | ||
* Special level for disabling all logging. | ||
* It's highly NOT suggested to turn off logging. Makes it hard to diagnose online/production bugs. | ||
*/ | ||
LevelNone | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NativeBuffer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters