- All Superinterfaces:
- All Known Subinterfaces:
public interface CommandContext extends CrdtContext, CrdtFactory, EffectContext, ClientActionContext, MetadataContextContext for handling a command.
This may be passed to any
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
commandId()The id of the command.
commandName()The name of the command.
delete()Delete the CRDT.
Methods inherited from interface io.cloudstate.javasupport.crdt.CrdtContext
getWriteConsistency, setWriteConsistency, state
Methods inherited from interface io.cloudstate.javasupport.crdt.CrdtFactory
newFlag, newGCounter, newGSet, newLWWRegister, newORMap, newORSet, newPNCounter, newVote
long commandId()The id of the command. This is an internal ID generated by the proxy, and is unique to a given entity stream. It may be used for debugging purposes.
- The ID of the command.
java.lang.String commandName()The name of the command.
Corresponds to the name of the rpc call in the protobuf definition.
- The name of the command.
void delete()Delete the CRDT.
When a CRDT is deleted, it may not be created again. Additionally, CRDT deletion results in tombstones that get accumulated for the life of the cluster. If you expect to delete CRDTs frequently, it's recommended that you store them in a single or sharded
ORMap, rather than individual CRDTs.