Class NamedStore

java.lang.Object
io.xpipe.core.impl.NamedStore
All Implemented Interfaces:
DataStore

public final class NamedStore extends Object implements DataStore
A store that refers to another store in the X-Pipe storage. The referenced store has to be resolved by the caller manually, as this class does not act as a resolver.
  • Constructor Details

    • NamedStore

      public NamedStore()
  • Method Details

    • validate

      public void validate() throws Exception
      Description copied from interface: DataStore
      Performs a validation of this data store.

      This validation can include one of multiple things: - Sanity checks of individual properties - Existence checks - Connection checks

      All in all, a successful execution of this method should almost guarantee that the data store can be successfully accessed in the near future.

      Note that some checks may take a long time, for example if a connection has to be validated. The caller should therefore expect a runtime of multiple seconds when calling this method.

      Specified by:
      validate in interface DataStore
      Throws:
      Exception - if any part of the validation went wrong
    • delete

      public boolean delete() throws Exception
      Specified by:
      delete in interface DataStore
      Throws:
      Exception
    • asNeeded

      public <DS extends DataStore> DS asNeeded()
      Description copied from interface: DataStore
      Casts this instance to the required type without checking whether a cast is possible.
      Specified by:
      asNeeded in interface DataStore
    • determineDefaultName

      public Optional<String> determineDefaultName()
      Description copied from interface: DataStore
      Determines on optional default name for this data store that is used when determining a suitable default name for a data source.
      Specified by:
      determineDefaultName in interface DataStore
    • determineLastModified

      public Optional<Instant> determineLastModified()
      Description copied from interface: DataStore
      Determines the last modified of this data store if this data store supports it.
      Specified by:
      determineLastModified in interface DataStore