GRÜN: Implementierung der Erwartungen inkl. Anpassungen an der Anwendung
[demos/kafka/training] / src / main / java / de / juplo / kafka / ApplicationRecordHandler.java
index ce340a7..93e1297 100644 (file)
@@ -22,7 +22,7 @@ public class ApplicationRecordHandler implements RecordHandler<String, String>
 
     if (message.equals("CALCULATE"))
     {
-      Long result = state.get(partition).calculate(user);
+      AdderResult result = state.get(partition).calculate(user);
       log.info("New result for {}: {}", user, result);
       return;
     }
@@ -30,12 +30,12 @@ public class ApplicationRecordHandler implements RecordHandler<String, String>
     state.get(partition).addToSum(user, Integer.parseInt(message));
   }
 
-  protected void addPartition(Integer partition, Map<String, Long> state)
+  protected void addPartition(Integer partition, Map<String, AdderResult> state)
   {
     this.state.put(partition, new AdderBusinessLogic(state));
   }
 
-  protected Map<String, Long> removePartition(Integer partition)
+  protected Map<String, AdderResult> removePartition(Integer partition)
   {
     return this.state.remove(partition).getState();
   }