Interface NonTransactionalDatabaseAdapter.CasOp<R>

    • Method Detail

      • apply

        NonTransactionalDatabaseAdapter.CasOpResult<R> apply​(NonTransactionalOperationContext ctx,
                                                             org.projectnessie.versioned.persist.serialize.AdapterTypes.RefPointer refPointer,
                                                             java.util.function.Consumer<org.projectnessie.versioned.Hash> branchCommits,
                                                             java.util.function.Consumer<org.projectnessie.versioned.Hash> newKeyLists)
                                                      throws org.projectnessie.versioned.VersionStoreException
        Applies an operation within a CAS-loop. The implementation gets the current ref-pointer and must return a NonTransactionalDatabaseAdapter.CasOpResult with the reference's new HEAD and function to configure the ref-log entry.
        Parameters:
        ctx - operation context
        refPointer - information about the target named reference
        branchCommits - if more commits than the one returned via the return value were optimistically written, those must be passed to this consumer.
        newKeyLists - IDs of optimistically written KeyListEntity entities must be passed to this consumer.
        Returns:
        "new value" that NonTransactionalDatabaseAdapter.casOpLoop(String, NamedRef, CasOpVariant, CasOp, Supplier) tries to apply
        Throws:
        org.projectnessie.versioned.VersionStoreException