reserve
Reserves key in namespace for this command's aggregate, such as a unique user name; false when another aggregate holds it. The key is unique among the aggregates of this aggregate's type, within its tenant (ReservationTenancy.TENANT): another tenant, or an aggregate of another type, may hold the same key (a type's reservations live with its log). A key unique across types, such as an e-mail address that users and organizations share, is modelled as an aggregate of its own that holds the keys, which the other aggregates claim through it.
The reservation is pending, with an expiry, until the events are appended; then it is confirmed. When they are surely not appended this attempt gives its reservation up, without touching another attempt's of the same aggregate, and if the process dies first it expires. A key the aggregate already holds confirmed stays held whatever this attempt does. A rename reserves the new key and releases the old one in one decision.
It is a suspend function, so a Java decide function cannot call it (a blocking bridge is planned for 10.x): a decide function that reserves keys is written in Kotlin.
Reserves key in namespace for this command's aggregate as reserve does, unique among the aggregates tenancy says: ReservationTenancy.SYSTEM makes it unique across the type's tenants.