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

com.yandex.ydb.table.SchemeClient Maven / Gradle / Ivy

package com.yandex.ydb.table;

import java.util.concurrent.CompletableFuture;

import javax.annotation.WillClose;

import com.yandex.ydb.core.Result;
import com.yandex.ydb.core.Status;
import com.yandex.ydb.table.description.DescribePathResult;
import com.yandex.ydb.table.description.ListDirectoryResult;
import com.yandex.ydb.table.impl.SchemeClientBuilderImpl;
import com.yandex.ydb.table.rpc.SchemeRpc;


/**
 * @author Sergey Polovko
 */
public interface SchemeClient extends AutoCloseable {

    static Builder newClient(@WillClose SchemeRpc schemeRpc) {
        return new SchemeClientBuilderImpl(schemeRpc);
    }

    /**
     * Create single directory.
     *
     * Parent directories must be already present.
     * @param path  path to directory
     * @return operation status
     */
    CompletableFuture makeDirectory(String path);

    /**
     * Create directory and all its parent directories if they are not present.
     *
     * @param path  path to directory
     * @return operation status
     */
    CompletableFuture makeDirectories(String path);

    CompletableFuture removeDirectory(String path);

    CompletableFuture> describePath(String path);

    CompletableFuture> listDirectory(String path);

    @Override
    void close();

    /**
     * BUILDER
     */
    interface Builder {

        SchemeClient build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy