commit method

  1. @override
Future<int?> commit(
  1. String key,
  2. CommitOp operation, {
  3. DateTime? opTime,
})
override

Append a new entry for key / operation. Returns the assigned commitId, or -1 for keys that bypass the commit log (private:, privatekey:, public:_, local:, ...).

opTime is the operation time recorded on the entry: pass a caller-asserted time (a delete's deletedAt, an update's asserted updatedAt) when the protocol supplied one; when null, now. Truncated to millisecond precision. Informational — entry ordering is by commitId, never by opTime.

Implementation

@override
Future<int?> commit(String key, CommitOp operation,
        {DateTime? opTime}) async =>
    commitSync(key, operation, opTime: opTime);