Annotation Type CrdtEntity
-
@Target(TYPE) @Retention(RUNTIME) public @interface CrdtEntityA CRDT backed entity.CRDT entities store their state in a subclass
Crdt. These may be created using aCrdtFactory, which can be injected into the constructor or as a parameter to anyCommandHandlerannotated method.Only one CRDT may be created, it is important that before creating a CRDT, the entity should check whether the CRDT has already been created, for example, it may have been created on another node and replicated to this node. To check, either use the
CrdtContext.state(Class)method, which can be injected into the constructor or anyCommandHandlermethod, or have an instance of the CRDT wrapped inOptionalinjected into the constructor or command handler methods.