Type Parameters:
T - the supported type for storing
All Known Implementing Classes:
JsonPathStorage, PathStorage

@Deprecated(since="7.0.0", forRemoval=true) public interface Storage<T>
Deprecated, for removal: This API element is subject to removal in a future version.
No replacement
A Storage allows load and save operations on objects. The mode of achieving this such as where the states are stored, null-safety, stored format and others will depend on the implementation.
Since:
6.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Loads the stored state as a new object.
    default CompletableFuture<? extends T>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Loads the stored state asynchronously.
    void
    save(T obj)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Stores the state of a given object.
    saveAsync(T obj)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Stores the state of a given object asynchronously.
  • Method Details

    • load

      T load() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Loads the stored state as a new object.
      Returns:
      a new object loaded with the stored state
      Throws:
      Exception - thrown when an implementation encountered a checked exception; the actual type may depend on the implementation
      NullPointerException - thrown when an implementation does not recognize null as a valid destination; usually it isn't
    • loadAsync

      default CompletableFuture<? extends T> loadAsync()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Loads the stored state asynchronously.
      Returns:
      the load future
      See Also:
    • save

      void save(T obj) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Stores the state of a given object.
      Parameters:
      obj - the object to store the state of
      Throws:
      Exception - thrown when an implementation encountered a checked exception; the actual type may depend on the implementation
      NullPointerException - thrown when an implementation does not recognize null as a valid state to store
    • saveAsync

      default CompletableFuture<Void> saveAsync(T obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Stores the state of a given object asynchronously.
      Parameters:
      obj - the object to store the state of
      Returns:
      the save future
      See Also: