return infoChannel
.getChatRoomInfo(id)
- .map(chatRoomInfo ->
- chatRoomInfo == null
- ? null
- : chatRoomData[shard].computeIfAbsent(
- id,
- (chatRoomId) ->
- {
- log.info("Creating ChatRoom {} with buffer-size {}", chatRoomId, bufferSize);
- KafkaChatMessageService service = new KafkaChatMessageService(this, chatRoomId);
- return new ChatRoomData(clock, service, bufferSize);
- }));
+ .map(chatRoomInfo -> chatRoomData[shard].computeIfAbsent(
+ id,
+ (chatRoomId) ->
+ {
+ log.info("Creating ChatRoom {} with buffer-size {}", chatRoomId, bufferSize);
+ KafkaChatMessageService service = new KafkaChatMessageService(this, chatRoomId);
+ return new ChatRoomData(clock, service, bufferSize);
+ }));
}
}