All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cloudstate.javasupport.crdt.CrdtEntityHandler Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package io.cloudstate.javasupport.crdt;

import com.google.protobuf.Any;

import java.util.Optional;

/**
 * Low level interface for handling CRDT commands.
 *
 * 

These are instantiated by a {@link CrdtEntityFactory}. * *

Generally, this should not be used, rather, a {@link CrdtEntity} annotated class should be * used. */ public interface CrdtEntityHandler { /** * Handle the given command. During the handling of a command, a CRDT may be created (if not * already created) and updated. * * @param command The command to handle. * @param context The context for the command. * @return A reply to the command, if any is sent. */ Optional handleCommand(Any command, CommandContext context); /** * Handle the given stream command. During the handling of a command, a CRDT may be created (if * not already created) and updated. * * @param command The command to handle. * @param context The context for the command. * @return A reply to the command, if any is sent. */ Optional handleStreamedCommand(Any command, StreamedCommandContext context); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy