import java.util.UUID;
import java.util.concurrent.Phaser;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
{
Logger log = LoggerFactory.getLogger(StorageStrategy.class.getCanonicalName());
+ AtomicBoolean running = new AtomicBoolean(true);
+
+
default void write(ChatHomeService chatHomeService)
{
+ if (!running.getAndSet(false))
+ {
+ log.info("{} is not running, skip write...", chatHomeService);
+ return;
+ }
+
Phaser writtenChatRooms = new Phaser(1);
AtomicInteger numErrors = new AtomicInteger();