claim

abstract suspend fun claim(address: DeviceAddress, nonce: ByteArray, timestamp: Instant, pruneBefore: Instant): Boolean

In one atomic step:

  1. raises the prune watermark to pruneBefore if that is larger (it never decreases);

  2. refuses the claim (returns false, records nothing) if timestamp is before the watermark;

  3. removes every entry (of any device) whose request timestamp is before the watermark;

  4. records nonce for address with timestamp, or returns false and records nothing if nonce is already recorded for address.

Of concurrent claims of the same nonce for the same address, at most one returns true.