-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule
,com.facebook.react.bridge.ReactModuleWithSpec
,com.facebook.react.modules.common.ModuleDataCleaner.Cleanable
,com.facebook.react.turbomodule.core.interfaces.TurboModule
public final class AsyncStorageModule extends NativeAsyncSQLiteDBStorageSpec implements ModuleDataCleaner.Cleanable
-
-
Constructor Summary
Constructors Constructor Description AsyncStorageModule(ReactApplicationContext reactContext)
-
Method Summary
Modifier and Type Method Description String
getName()
void
initialize()
This is called at the end of createCatalystInstance afterthe CatalystInstance has been created, in order to initialize NativeModules that require theCatalystInstance or JS modules. void
invalidate()
The CatalystInstance is going away with Venice. void
clearSensitiveData()
void
multiGet(ReadableArray keys, Callback callback)
Given an array of keys, this returns a map of (key, value) pairs for the keys found, and (key,null) for the keys that haven't been found. void
multiSet(ReadableArray keyValueArray, Callback callback)
Inserts multiple (key, value) pairs. void
multiRemove(ReadableArray keys, Callback callback)
Removes all rows of the keys given. void
multiMerge(ReadableArray keyValueArray, Callback callback)
Given an array of (key, value) pairs, this will merge the given values with the stored valuesof the given keys, if they exist. void
clear(Callback callback)
Clears the database. void
getAllKeys(Callback callback)
Returns an array with all keys from the database. -
Methods inherited from class com.facebook.fbreact.specs.NativeAsyncSQLiteDBStorageSpec
clear, getAllKeys, multiGet, multiMerge, multiRemove, multiSet
-
Methods inherited from class com.facebook.react.bridge.BaseJavaModule
canOverrideExistingModule, getConstants, hasConstants, onCatalystInstanceDestroy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AsyncStorageModule
AsyncStorageModule(ReactApplicationContext reactContext)
-
-
Method Detail
-
initialize
void initialize()
This is called at the end of createCatalystInstance afterthe CatalystInstance has been created, in order to initialize NativeModules that require theCatalystInstance or JS modules.
-
invalidate
void invalidate()
The CatalystInstance is going away with Venice. Therefore, the TurboModule infra introduces theinvalidate() method to allow NativeModules to clean up after themselves.
-
clearSensitiveData
void clearSensitiveData()
-
multiGet
void multiGet(ReadableArray keys, Callback callback)
Given an array of keys, this returns a map of (key, value) pairs for the keys found, and (key,null) for the keys that haven't been found.
-
multiSet
void multiSet(ReadableArray keyValueArray, Callback callback)
Inserts multiple (key, value) pairs. If one or more of the pairs cannot be inserted, this willreturn AsyncLocalStorageFailure, but all other pairs will have been inserted. The insertionwill replace conflicting (key, value) pairs.
-
multiRemove
void multiRemove(ReadableArray keys, Callback callback)
Removes all rows of the keys given.
-
multiMerge
void multiMerge(ReadableArray keyValueArray, Callback callback)
Given an array of (key, value) pairs, this will merge the given values with the stored valuesof the given keys, if they exist.
-
getAllKeys
void getAllKeys(Callback callback)
Returns an array with all keys from the database.
-
-
-
-