recordIfAbsent

open fun recordIfAbsent(contentHash: String): Boolean

Atomically claim a content hash: record it and report whether the claim was new. This collapses the check-then-record sequence into a single step so concurrent attempts to ingest identical content cannot both pass a separate seen-check before either records.

The default implementation is a non-atomic fallback over seen/record for existing implementations; ledgers used under concurrent ingestion should override this with a genuinely atomic operation.

Return

true if the hash was newly recorded, false if already present

Parameters

contentHash

The deduplication key to claim