io.tarantool.driver.core.metadata.ProxyTarantoolMetadataContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cartridge-driver Show documentation
Show all versions of cartridge-driver Show documentation
Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework
package io.tarantool.driver.core.metadata;
import io.tarantool.driver.api.metadata.TarantoolIndexMetadata;
import io.tarantool.driver.api.metadata.TarantoolMetadataContainer;
import io.tarantool.driver.api.metadata.TarantoolSpaceMetadata;
import java.util.HashMap;
import java.util.Map;
/**
* Contains spaces and indexes metadata information retrieved from a call to a stored function
*
* @author Sergey Volgin
*/
public class ProxyTarantoolMetadataContainer implements TarantoolMetadataContainer {
private final Map spaceMetadata = new HashMap<>();
private final Map> indexMetadata = new HashMap<>();
public ProxyTarantoolMetadataContainer() {
}
@Override
public Map getSpaceMetadataByName() {
return spaceMetadata;
}
@Override
public Map> getIndexMetadataBySpaceName() {
return indexMetadata;
}
public void addSpace(TarantoolSpaceMetadata metadata) {
spaceMetadata.put(metadata.getSpaceName(), metadata);
}
public void addIndexes(String spaceName, Map indexMetadataMap) {
indexMetadata.put(spaceName, indexMetadataMap);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy