org.zodiac.sentinel.base.datasource.AbstractClusterDataSourceOption Maven / Gradle / Ivy
The newest version!
package org.zodiac.sentinel.base.datasource;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import org.zodiac.sentinel.base.cluster.client.ClusterClientOption;
import org.zodiac.sentinel.base.cluster.client.ClusterDataSourceOption;
public abstract class AbstractClusterDataSourceOption extends AbstractDataSourceOption implements ClusterDataSourceOption {
private static final long serialVersionUID = -1635014749451948788L;
private ClusterClientOption clusterOption;
protected AbstractClusterDataSourceOption(DataSourceType dataSourceType, ClusterClientOption clusterOption) {
super(dataSourceType);
this.clusterOption = Objects.requireNonNull(clusterOption, "clusterOption");
}
@NotNull
@Override
public ClusterClientOption getClusterOption() {
return clusterOption;
}
}