package ru.yandex.qe.dispenser.domain.hierarchy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.SmartLifecycle;

public class CachingHierarchyLifecycle implements SmartLifecycle {

    @Autowired
    private CachingHierarchySupplier hierarchySupplier;

    @Override
    public boolean isAutoStartup() {
        return false;
    }

    @Override
    public void stop(final Runnable callback) {

    }

    @Override
    public void start() {
        hierarchySupplier.update();
    }

    @Override
    public void stop() {

    }

    @Override
    public boolean isRunning() {
        return false;
    }

    @Override
    public int getPhase() {
        return 1000;
    }
}
