Mono<Void> restore(StorageStrategy storageStrategy)
{
+ chatRoomInfo.clear();
+ chatRoomData.clear();
+
return storageStrategy
.readChatRoomInfo()
.filter(info ->
return chatMessageService.restore(storageStrategy);
})
- .then()
- .doOnSuccess(empty -> log.info("Restored {}", this))
- .doOnError(throwable -> log.error("Could not restore {}", this));
+ .count()
+ .doOnSuccess(count -> log.info("Restored {} with {} chat-rooms", this, count))
+ .doOnError(throwable -> log.error("Could not restore {}", this))
+ .then();
}