Interface MetadataStoreExtended

All Superinterfaces:
AutoCloseable, MetadataStore
All Known Implementing Classes:
AbstractBatchedMetadataStore, AbstractMetadataStore, EtcdMetadataStore, FaultInjectionMetadataStore, LocalMemoryMetadataStore, RocksdbMetadataStore, ZKMetadataStore

public interface MetadataStoreExtended extends MetadataStore
Extension of the MetadataStore interface that includes more methods which might not be supported by all implementations.
  • Method Details

    • create

      static MetadataStoreExtended create(String metadataURL, MetadataStoreConfig metadataStoreConfig) throws MetadataStoreException
      Throws:
      MetadataStoreException
    • put

      CompletableFuture<Stat> put(String path, byte[] value, Optional<Long> expectedVersion, EnumSet<CreateOption> options)
      Put a new value for a given key. The caller can specify an expected version to be atomically checked against the current version of the stored data. The future will return the Stat object associated with the newly inserted value.
      Parameters:
      path - the path of the key to delete from the store
      value - the value to
      expectedVersion - if present, the version will have to match with the currently stored value for the operation to succeed. Use -1 to enforce a non-existing value.
      options - a set of CreateOption to use if the the key-value pair is being created
      Returns:
      a future to track the async request
      Throws:
      MetadataStoreException.BadVersionException - if the expected version doesn't match the actual version of the data
    • registerSessionListener

      void registerSessionListener(Consumer<SessionEvent> listener)
      Register a session listener that will get notified of changes in status of the current session.
      Parameters:
      listener - the session listener
    • getMetadataEventSynchronizer

      default Optional<MetadataEventSynchronizer> getMetadataEventSynchronizer()
      Get MetadataEventSynchronizer to notify and synchronize metadata events.
      Returns: