1 package de.juplo.kafka;
4 import java.util.HashMap;
8 public class AdderBusinessLogic
10 private final Map<String, Long> state;
13 public AdderBusinessLogic()
15 this(new HashMap<>());
18 public AdderBusinessLogic(Map<String, Long> state)
24 public synchronized void startSum(String user)
26 if (state.containsKey(user))
27 throw new IllegalStateException("Sumation for " + user + " already in progress, state: " + state.get(user));