Interface MTRStorage

  • All Known Subinterfaces:
    MTRPersistentStorageDelegate

    public interface MTRStorage
    This protocol is used by the Matter framework to read and write storage. The Matter framework may call storage methods from arbitrary threads, but will not call storage methods concurrently. Implementations of the storage methods must not call into any Matter framework APIs. API-Since: 16.4
    • Method Detail

      • removeStorageDataForKey

        boolean removeStorageDataForKey​(@NotNull
                                        @NotNull java.lang.String key)
        Delete the key and corresponding data. Returns YES if the key was present, NO if the key was not present.
      • setStorageDataForKey

        boolean setStorageDataForKey​(@NotNull
                                     @NotNull NSData value,
                                     @NotNull
                                     @NotNull java.lang.String key)
        Set the data for the viven key to the given value. Returns YES if the key was set successfully, NO otherwise.
      • storageDataForKey

        @Nullable
        @Nullable NSData storageDataForKey​(@NotNull
                                           @NotNull java.lang.String key)
        Get the data for the given key. Returns nil if there is no data for the key.