.toArray();
}
- Mono<ChatRoomData> getChatRoom(int shard, UUID id)
+ Mono<ChatRoomData> getChatRoomData(int shard, UUID id)
{
if (loadInProgress)
{
return Mono.justOrEmpty(chatrooms[shard].get(id));
}
- Flux<ChatRoomData> getChatRooms()
+ Flux<ChatRoomData> getChatRoomData()
{
return Flux
.fromStream(IntStream.range(0, numShards).mapToObj(i -> Integer.valueOf(i)))
{
int shard = selectShard(id);
return chatRoomChannel
- .getChatRoom(shard, id)
+ .getChatRoomData(shard, id)
.switchIfEmpty(Mono.error(() -> new UnknownChatroomException(
id,
shard,
@Override
public Flux<ChatRoomInfo> getChatRoomInfo()
{
- return chatRoomChannel.getChatRooms();
+ return chatRoomChannel.getChatRoomData();
}
@Override
{
int shard = selectShard(id);
return chatRoomChannel
- .getChatRoom(shard, id)
+ .getChatRoomData(shard, id)
.switchIfEmpty(Mono.error(() -> new UnknownChatroomException(
id,
shard,
@Override
public Flux<ChatRoomData> getChatRoomData()
{
- return chatRoomChannel.getChatRooms();
+ return chatRoomChannel.getChatRoomData();
}
int selectShard(UUID chatRoomId)