+package de.juplo.kafka;
+
+import lombok.ToString;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Document(collection = "statistics")
+@ToString
+public class StateDocument
+{
+ @Id
+ public String id;
+ public long offset = -1l;
+ public Map<String, Long> state;
+ public Map<String, List<Long>> seen;
+
+ public StateDocument()
+ {
+ }
+
+ public StateDocument(Integer partition)
+ {
+ this.id = Integer.toString(partition);
+ this.state = new HashMap<>();
+ this.seen = new HashMap<>();
+ }
+
+ public StateDocument(
+ Integer partition,
+ Map<String, Long> state,
+ Map<String, List<Long>> seen)
+ {
+ this.id = Integer.toString(partition);
+ this.state = state;
+ this.seen = seen;
+ }
+}