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

io.tarantool.driver.api.metadata.TarantoolSpaceMetadata Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
package io.tarantool.driver.api.metadata;

import java.io.Serializable;
import java.util.Map;
import java.util.Optional;

public interface TarantoolSpaceMetadata extends Serializable {
    /**
     * Get space ID on the Tarantool server
     *
     * @return a number
     */
    int getSpaceId();

    /**
     * Get owner ID
     *
     * @return a number
     */
    int getOwnerId();

    /**
     * Get space name
     *
     * @return a non-empty {@code String}
     */
    String getSpaceName();

    /**
     * Get map with metadata of fields
     *
     * @return map whose key is field name and value is {@link TarantoolFieldMetadata}
     */
    Map getSpaceFormatMetadata();

    /**
     * Get field metadata by name
     *
     * @param fieldName field name
     * @return field position by name starting with 0, or -1 if this field not found in format metadata
     */
    Optional getFieldByName(String fieldName);

    /**
     * Get field metadata by position
     *
     * @param fieldPosition field position starting with 0
     * @return field name or null if this field not found in format metadata
     */
    Optional getFieldByPosition(int fieldPosition);

    /**
     * Get field position in space by name starts with 0, or -1 if this field not found in format metadata
     *
     * @param fieldName field name
     * @return field position by name starting with 0, or -1 if this field not found in format metadata
     */
    int getFieldPositionByName(String fieldName);

    /**
     * Get field name by position
     *
     * @param fieldPosition field position starting with 0
     * @return field name or null if this field not found in format metadata
     */
    Optional getFieldNameByPosition(int fieldPosition);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy