@Documented
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface ActiveObject
Marks a class as an active object whose ActiveMethod-annotated methods are automatically routed through an internal actor for thread-safe, serialised execution.
All @ActiveMethod calls on the same instance are processed
one at a time — no locks needed.
{@literal @ActiveObject
class Account {
private double balance = 0
@ActiveMethod
void deposit(double amount) { balance += amount }
@ActiveMethod(blocking = false)
Awaitable getBalance() { balance }
}
}
The name of the generated actor field.