import java.time.Clock;
import java.time.LocalDateTime;
-import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public ChatRoomData(
- ChatRoomService service,
Clock clock,
+ ChatRoomService service,
int bufferSize)
{
log.info("Created ChatRoom with buffer-size {}", bufferSize);
- this.service = service;
this.clock = clock;
+ this.service = service;
this.bufferSize = bufferSize;
// @RequiredArgsConstructor unfortunately not possible, because
// the `bufferSize` is not set, if `createSink()` is called
chatRoomData.put(
info.getId(),
new ChatRoomData(
- chatRoomServiceFactory.create(messageFlux),
clock,
+ chatRoomServiceFactory.create(messageFlux),
bufferSize));
});
this.clock = clock;
log.info("Creating ChatRoom with buffer-size {}", bufferSize);
ChatRoomService service = new InMemoryChatRoomService(Flux.empty());
ChatRoomInfo chatRoomInfo = new ChatRoomInfo(id, name, shard);
- ChatRoomData chatRoomData = new ChatRoomData(service, clock, bufferSize);
+ ChatRoomData chatRoomData = new ChatRoomData(clock, service, bufferSize);
this.chatRoomData.put(id, chatRoomData);
return Mono.just(chatRoomInfo);
}