package com.njzscloud.common.localizer.config;

import com.njzscloud.common.localizer.tuqiang.Tuqiang;

public class LocalizerInitializer {
    private final LocalizerProperties properties;

    public LocalizerInitializer(LocalizerProperties properties) {
        this.properties = properties;
    }

    public void init() {
        Tuqiang.run(properties.getPort(), properties.getBossThreads(), properties.getWorkerThreads());
    }

    private void destroy() {
        Tuqiang.stop();
    }
}
