Interface ClientStorageServiceStore

    • Method Detail

      • isDirty

        boolean isDirty()
        Get the dirty bit for the current data.
        Returns:
        status of dirty bit
      • setDirty

        void setDirty​(boolean flag)
        Set the dirty bit for the current data.
        Parameters:
        flag - dirty bit to set
      • load

        void load​(@Nullable @NotEmpty
                  String raw,
                  @Nonnull
                  ClientStorageService.ClientStorageSource src)
        Reconstitute stored data.

        The dirty bit is set based on the result. If successful, the bit is cleared, but if an error occurs, it will be set.

        By design this method should not throw under any non-catastrophic conditions.

        Parameters:
        raw - serialized data to load
        src - storage source
      • save

        @Nullable
        ClientStorageServiceOperation save​(@Nonnull
                                           ClientStorageService storageService)
                                    throws IOException
        Serialize current state of stored data into a storage operation.
        Parameters:
        storageService - storage service
        Returns:
        the operation, or a null if the data has not been modified since loading or saving
        Throws:
        IOException - if an error occurs