import java.util.UUID;
-@RequiredArgsConstructor
+@RequiredArgsConstructor(staticName = "of")
@EqualsAndHashCode(of = { "id" })
@ToString(of = { "id", "name", "shard" })
public class ChatRoomInfo
private final boolean[] isShardOwned;
private final long[] currentOffset;
private final long[] nextOffset;
- private final Map<UUID, ChatRoom>[] chatrooms;
+ private final Map<UUID, ChatRoomInfo>[] chatrooms;
private boolean running;
@Getter
Message.MessageKey key = Message.MessageKey.of(chatMessageTo.getUser(), chatMessageTo.getId());
Message message = new Message(key, offset, timestamp, chatMessageTo.getText());
- ChatRoom chatRoom = chatrooms[partition].get(chatRoomId);
+ ChatRoomInfo chatRoom = chatrooms[partition].get(chatRoomId);
KafkaChatRoomService kafkaChatRoomService =
(KafkaChatRoomService) chatRoom.getChatRoomService();
}
- private void putChatRoom(ChatRoom chatRoom)
+ private void putChatRoom(ChatRoomInfo chatRoom)
{
Integer partition = chatRoom.getShard();
UUID chatRoomId = chatRoom.getId();