Class DataStore<T>

java.lang.Object
dev.upcraft.sparkweave.api.util.data.DataStore<T>

@Deprecated(forRemoval=true) public class DataStore<T> extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataStore(String name, Supplier<T> dataSupplier, Duration cacheDuration)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    DataStore(String name, Supplier<T> dataSupplier, Duration cacheDuration, boolean allowStale)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onRefresh(Consumer<T> callback)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    refresh(Executor executor, boolean force)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataStore

      public DataStore(String name, Supplier<T> dataSupplier, Duration cacheDuration)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DataStore

      public DataStore(String name, Supplier<T> dataSupplier, Duration cacheDuration, boolean allowStale)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getLastRefresh

      public Instant getLastRefresh()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isStale

      public boolean isStale()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • refresh

      public CompletableFuture<Void> refresh(Executor executor, boolean force)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • tryGet

      public Optional<T> tryGet()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • get

      public T get()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • onRefresh

      public void onRefresh(Consumer<T> callback)
      Deprecated, for removal: This API element is subject to removal in a future version.