Interface MetadataStoreExtended

    • Method Detail

      • put

        java.util.concurrent.CompletableFuture<Stat> put​(java.lang.String path,
                                                         byte[] value,
                                                         java.util.Optional<java.lang.Long> expectedVersion,
                                                         java.util.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​(java.util.function.Consumer<SessionEvent> listener)
        Register a session listener that will get notified of changes in status of the current session.
        Parameters:
        listener - the session listener