return infoChannel
.getChatRoomInfo(id)
.map(chatRoomInfo ->
- {
- if (chatRoomInfo == null) return null;
- return 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);
- });
- });
+ 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);
+ }));
}
}