Der Test verwendet die `@Bean` von `EndlessConsumer`
[demos/kafka/training] / src / main / java / de / juplo / kafka / StateDocument.java
index 2583c8e..ae8eb51 100644 (file)
@@ -9,14 +9,14 @@ import java.util.List;
 import java.util.Map;
 
 
-@Document(collection = "statistics")
+@Document(collection = "state")
 @ToString
 public class StateDocument
 {
   @Id
   public String id;
-  public long offset = -1l;
-  public Map<String, Long> state;
+  public Map<String, AdderResult> state;
+  public Map<String, List<AdderResult>> results;
 
   public StateDocument()
   {
@@ -26,15 +26,16 @@ public class StateDocument
   {
     this.id = Integer.toString(partition);
     this.state = new HashMap<>();
+    this.results = new HashMap<>();
   }
 
   public StateDocument(
       Integer partition,
-      Map<String, Long> state,
-      long offset)
+      Map<String, AdderResult> state,
+      Map<String, List<AdderResult>> results)
   {
     this.id = Integer.toString(partition);
     this.state = state;
-    this.offset = offset;
+    this.results = results;
   }
 }