Package 

Class AsyncStorageModule

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static String NAME
    • 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
    • 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.

      • 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.

      • 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.