All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.mengxianun.elasticsearch.schema.ElasticsearchTable Maven / Gradle / Ivy

package com.github.mengxianun.elasticsearch.schema;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.github.mengxianun.core.schema.AbstractTable;
import com.github.mengxianun.core.schema.Schema;
import com.github.mengxianun.core.schema.TableType;

public class ElasticsearchTable extends AbstractTable {

	private final Set aliases;

	public ElasticsearchTable(String name, TableType type, Schema schema) {
		super(name, type, schema);
		this.aliases = new HashSet<>();
	}

	@Override
	public Map getInfo() {
		Map info = super.getInfo();
		info.put("aliases", aliases);
		return info;
	}

	public void addAlias(String alias) {
		aliases.add(alias);
	}

	public void addAliases(Set aliases) {
		this.aliases.addAll(aliases);
	}

	public Set getAliases() {
		return aliases;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy