Interface CrdtEntityHandler


  • public interface CrdtEntityHandler
    Low level interface for handling CRDT commands.

    These are instantiated by a CrdtEntityFactory.

    Generally, this should not be used, rather, a CrdtEntity annotated class should be used.

    • 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.