Interface WriteableTransaction

    • Method Detail

      • openTree

        void openTree​(TreeName name,
                      boolean createOnDemand)
        Opens the tree identified by the provided name.
        Parameters:
        name - the tree name
        createOnDemand - true if the tree should be created if it does not exist
      • deleteTree

        void deleteTree​(TreeName name)
        Deletes the tree identified by the provided name.
        Parameters:
        name - the tree name
      • put

        void put​(TreeName treeName,
                 ByteSequence key,
                 ByteSequence value)
        Adds a record with the provided key and value, replacing any existing record having the same key.
        Parameters:
        treeName - the tree name
        key - the key of the new record
        value - the value of the new record
      • update

        boolean update​(TreeName treeName,
                       ByteSequence key,
                       UpdateFunction f)
        Atomically adds, deletes, or replaces a record with the provided key according to the new value computed by the update function.
        Parameters:
        treeName - the tree name
        key - the key of the new record
        f - the update function
        Returns:
        true if an update was performed, false otherwise
        See Also:
        UpdateFunction.computeNewValue(ByteSequence)
      • delete

        boolean delete​(TreeName treeName,
                       ByteSequence key)
        Deletes the record with the provided key, in the tree whose name is provided.
        Parameters:
        treeName - the tree name
        key - the key of the record to delete
        Returns:
        true if the record could be deleted, false otherwise