From: Kai Moritz Date: Fri, 18 Aug 2023 12:40:43 +0000 (+0200) Subject: NG X-Git-Tag: rebase--2023-08-18-abends~14 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=05f5fc8a52be6b9f960e7f197e0aac3b45188f13;p=demos%2Fkafka%2Fchat NG --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/StorageStrategy.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/StorageStrategy.java index 38076800..ab515057 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/StorageStrategy.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/StorageStrategy.java @@ -7,6 +7,6 @@ import reactor.core.publisher.Flux; public interface StorageStrategy { - void write(Flux chatroomFlux); + void write(Flux chatroomFlux); Flux read(); } diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/files/FilesStorageStrategy.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/files/FilesStorageStrategy.java index e1611225..f0ee1dfb 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/files/FilesStorageStrategy.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/files/FilesStorageStrategy.java @@ -5,7 +5,6 @@ import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import de.juplo.kafka.chat.backend.api.ChatRoomInfoTo; import de.juplo.kafka.chat.backend.api.MessageTo; -import de.juplo.kafka.chat.backend.domain.ChatRoomInfo; import de.juplo.kafka.chat.backend.domain.ShardingStrategy; import de.juplo.kafka.chat.backend.domain.ChatRoom; import de.juplo.kafka.chat.backend.domain.Message; @@ -40,7 +39,7 @@ public class FilesStorageStrategy implements StorageStrategy @Override - public void write(Flux chatroomFlux) + public void write(Flux chatroomFlux) { Path path = chatroomsPath(); log.info("Writing chatrooms to {}", path); diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java index c29d4f72..a6db124a 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java @@ -23,7 +23,7 @@ public class ChatRoomTo private String name; private List messages; - public static ChatRoomTo from(ChatRoomInfo chatroom) + public static ChatRoomTo from(ChatRoom chatroom) { return new ChatRoomTo( chatroom.getId().toString(), diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java index 8318c6cf..d21fe2ba 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java @@ -24,7 +24,7 @@ public class MongoDbStorageStrategy implements StorageStrategy @Override - public void write(Flux chatroomFlux) + public void write(Flux chatroomFlux) { chatroomFlux .map(ChatRoomTo::from)