Class CommandHandlerWithReplyBuilderByState$

java.lang.Object
org.apache.pekko.persistence.typed.state.javadsl.CommandHandlerWithReplyBuilderByState$

public class CommandHandlerWithReplyBuilderByState$ extends Object
  • Field Details

  • Constructor Details

    • CommandHandlerWithReplyBuilderByState$

      public CommandHandlerWithReplyBuilderByState$()
  • Method Details

    • builder

      public <Command, S extends State, State> CommandHandlerWithReplyBuilderByState<Command,S,State> builder(Class<S> stateClass)
      Parameters:
      stateClass - The handlers defined by this builder are used when the state is an instance of the stateClass
      Returns:
      A new, mutable, CommandHandlerWithReplyBuilderByState
    • builder

      public <Command, State> CommandHandlerWithReplyBuilderByState<Command,State,State> builder(Predicate<State> statePredicate)
      Parameters:
      statePredicate - The handlers defined by this builder are used when the statePredicate is true, useful for example when state type is an Optional
      Returns:
      A new, mutable, CommandHandlerWithReplyBuilderByState