package ru.yandex.webmaster3.storage.util.sql;

import org.apache.tomcat.jdbc.pool.DataSource;
import org.springframework.beans.factory.annotation.Required;

import java.util.List;

/**
 * @author avhaliullin
 */
public class LogicalDataSource {
    private String dbIdentity;
    private DataSource masterSource;
    private List<DataSource> slaveSources;

    public DataSource getMasterSource() {
        return masterSource;
    }

    public List<DataSource> getSlaveSources() {
        return slaveSources;
    }

    public String getDbIdentity() {
        return dbIdentity;
    }

    @Required
    public void setMasterSource(DataSource masterSource) {
        this.masterSource = masterSource;
    }

    @Required
    public void setSlaveSources(List<DataSource> slaveSources) {
        this.slaveSources = slaveSources;
    }

    @Required
    public void setDbIdentity(String dbIdentity) {
        this.dbIdentity = dbIdentity;
    }
}
