package ru.yandex.qe.dispenser.domain.dao.bot.monitoring;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import ru.yandex.qe.dispenser.domain.bot.BotSyncStatus;

public class BotSyncStatusDaoImpl implements BotSyncStatusDao {
    private BotSyncStatus botSyncStatus;

    @Override
    public @NotNull BotSyncStatus upsert(@NotNull final BotSyncStatus newStatus) {
        botSyncStatus = newStatus;
        return newStatus;
    }

    @Override
    public @Nullable BotSyncStatus read() {
        return botSyncStatus;
    }

    @Override
    public boolean clean() {
        botSyncStatus = null;
        return true;
    }
}
