io.split.client.YamlLocalhostSplitFile Maven / Gradle / Ivy
package io.split.client;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.Yaml;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Map;
public class YamlLocalhostSplitFile extends AbstractLocalhostSplitFile {
private static final Logger _log = LoggerFactory.getLogger(YamlLocalhostSplitFile.class);
public YamlLocalhostSplitFile(LocalhostSplitFactory localhostSplitFactory, String directory, String filenameYaml) throws IOException {
super(localhostSplitFactory, directory, filenameYaml);
}
public Map readOnSplits() throws IOException {
Map onSplits = Maps.newHashMap();
try {
Yaml yaml = new Yaml();
List