this.ctx (an ActorContext) holds the instance’s identity, per-key storage, single alarm, and one-shot init.
ctx.id
The customer-supplied name for this actor — opaque string. You chose it via env.<BINDING>.idFromName(name). Common patterns: caller E.164, CRM user id, email, or a composite key.
ctx.blockConcurrencyWhile(fn)
One-shot init primitive. Use it inside a subclass constructor to gate all other calls until init finishes. 30s budget — a callback that exceeds it fails init (BlockConcurrencyTimeoutError), and the activation is torn down and retried on the next call.
ctx.setAlarm(when)
Top-level alias for ctx.storage.setAlarm(when). when is ms since epoch. See Alarms.
Related
- Actor Storage —
ctx.storage - Base Class — where
this.ctxcomes from - Alarms — the alarm contract