Appendix A — Runtime and Collection API Quick Reference
This appendix locates entry points. It does not replace chapter
semantics, failure windows, or evidence boundaries. APIs are pinned to
DSM 505e7557 / 0.1.2.
Runtime
| Action | Entry point | Key constraint |
|---|---|---|
| Build | DsmRuntimeBuilder.builder() |
fix clusterId, serviceId, membership, and
security/observation extensions |
| Register Register | runtime.register(spec) |
complete before start(); locator is unique |
| Register Lease | runtime.leaseRegister(spec) |
provide codec, entity factory, and Lease policy |
| Register CRDT | runtime.crdt(spec, merger) |
provide update/state codecs, initial state, and merger |
| Start | runtime.start() |
freezes registry; success enters RUNNING |
| Diagnose | runtime.diagnostics() |
immutable local snapshot, not a global view |
| Readiness | runtime.isReady() |
true only in RUNNING |
| Close | runtime.close() |
releases local resources; does not reverse business effects |
Shared collection identity
CollectionLocator = tenantId / applicationId / collectionId
CollectionSpec = locator + schemaId/fingerprint + codec + consistency tier
Equal entryKey values identify the same logical state
only inside the same communication domain and locator. An incompatible
schema is rejected instead of guessed.
Register
| Operation | Meaning | No guarantee of |
|---|---|---|
put(entity) |
commit a current candidate locally | remote visibility on return |
get(key) |
value visible to this node | linearized global read |
remove(key) |
commit removal locally | completed removal on every peer |
all() / size() |
query local projection | exact global snapshot |
changes(options) |
bounded observation stream | lossless historical log |
A resolver remains deterministic; dependence on argument order is rejected or backed by a commutativity proof.
Lease
| Operation | Result focus |
|---|---|
acquire |
granted, uncertain, holder, expiry,
fencing token, reason |
renew |
token/holder remains valid and membership/mode permits renewal |
transfer |
new owner and higher fencing token |
release |
releases coordination state; does not revoke external writes |
The external resource validates the fencing token. AUTONOMOUS mode can temporarily produce dual holders during a partition; QUORUM fails closed during unstable membership or missing majority.
CRDT
| Action | Meaning |
|---|---|
apply(update) |
merge a local update into state and produce a propagatable delta |
state() |
merged state visible on this node |
A merger is commutative, associative, and idempotent. A PN-Counter fits mergeable operational counts and does not automatically become a financial fact.
Common builders
CollectionSpecBuilder.register(...)LeaseCollectionSpecBuilder.lease(...)CrdtCollectionSpecBuilder.crdt(...)
Set a stable locator and schemaId, then supply typed
codecs. Construct specs in one assembly boundary rather than across
business services.