org.sirix.access.LocalDatabaseModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirix-core Show documentation
Show all versions of sirix-core Show documentation
SirixDB is a hybrid on-disk and in-memory document oriented, versioned database system. It has a lightweight buffer manager, stores everything in a huge persistent and durable tree and allows efficient reconstruction of every revision. Furthermore, SirixDB implements change tracking, diffing and supports time travel queries.
package org.sirix.access;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import org.sirix.access.trx.TransactionManagerImpl;
import org.sirix.api.Database;
import org.sirix.api.TransactionManager;
import org.sirix.dagger.DatabaseName;
import org.sirix.dagger.DatabaseScope;
/**
* A module with common dependencies to all {@link Database} subcomponents.
*
* @author Joao Sousa
*/
@Module
public interface LocalDatabaseModule {
@Provides
@DatabaseScope
@DatabaseName
static String databaseName(final DatabaseConfiguration configuration) {
return configuration.getDatabaseName();
}
@Provides
@DatabaseScope
static DatabaseType databaseType(final DatabaseConfiguration configuration) {
return configuration.getDatabaseType();
}
@Binds
@DatabaseScope
TransactionManager transactionManager(TransactionManagerImpl transactionManager);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy