Class EventHandlerBuilderByState$
java.lang.Object
org.apache.pekko.persistence.typed.javadsl.EventHandlerBuilderByState$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventHandlerBuilderByState$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<S extends State,State, Event>
EventHandlerBuilderByState<S,State, Event> <State,Event>
EventHandlerBuilderByState<State,State, Event>
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
EventHandlerBuilderByState$
public EventHandlerBuilderByState$()
-
-
Method Details
-
builder
public <S extends State,State, EventHandlerBuilderByState<S,Event> State, builderEvent> (Class<S> stateClass) - Parameters:
stateClass- The handlers defined by this builder are used when the state is an instance of thestateClass- Returns:
- A new, mutable, EventHandlerBuilderByState
-
builder
public <State,Event> EventHandlerBuilderByState<State,State, builderEvent> (Predicate<State> statePredicate) - Parameters:
statePredicate- The handlers defined by this builder are used when thestatePredicateistrue, useful for example when state type is an Optional- Returns:
- A new, mutable, EventHandlerBuilderByState
-