Package io.cloudstate.javasupport.crdt
Interface CrdtEntityHandler
-
public interface CrdtEntityHandlerLow level interface for handling CRDT commands.These are instantiated by a
CrdtEntityFactory.Generally, this should not be used, rather, a
CrdtEntityannotated class should be used.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<com.google.protobuf.Any>handleCommand(com.google.protobuf.Any command, CommandContext context)Handle the given command.java.util.Optional<com.google.protobuf.Any>handleStreamedCommand(com.google.protobuf.Any command, StreamedCommandContext<com.google.protobuf.Any> context)Handle the given stream command.
-
-
-
Method Detail
-
handleCommand
java.util.Optional<com.google.protobuf.Any> handleCommand(com.google.protobuf.Any command, CommandContext context)Handle the given command. During the handling of a command, a CRDT may be created (if not already created) and updated.- Parameters:
command- The command to handle.context- The context for the command.- Returns:
- A reply to the command, if any is sent.
-
handleStreamedCommand
java.util.Optional<com.google.protobuf.Any> handleStreamedCommand(com.google.protobuf.Any command, StreamedCommandContext<com.google.protobuf.Any> context)Handle the given stream command. During the handling of a command, a CRDT may be created (if not already created) and updated.- Parameters:
command- The command to handle.context- The context for the command.- Returns:
- A reply to the command, if any is sent.
-
-