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

tech.ydb.yoj.repository.db.Repository Maven / Gradle / Ivy

Go to download

Core YOJ (YDB ORM for Java) abstractions and APIs for domain entities, repositories, transactions etc.

The newest version!
package tech.ydb.yoj.repository.db;

import java.util.Set;

public interface Repository {
    default void createTablespace() {
    }

    default void checkDataCompatibility() {
    }

    default void checkSchemaCompatibility() {
    }

    > SchemaOperations schema(Class c);

    /**
     * @deprecated For testing purposes only. Will only reliably work for tables that were created or inspected
     * using calls to {@link #schema(Class)}.
     */
    @Deprecated
    Set>> tables();

    default RepositoryTransaction startTransaction() {
        return startTransaction(IsolationLevel.SERIALIZABLE_READ_WRITE);
    }

    default RepositoryTransaction startTransaction(IsolationLevel isolationLevel) {
        return startTransaction(TxOptions.create(isolationLevel));
    }

    RepositoryTransaction startTransaction(TxOptions options);

    void dropDb();

    String makeSnapshot();

    void loadSnapshot(String id);

    default boolean healthCheck() {
        return true;
    }

    default void shutdown() {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy