Search in sources :

Example 1 with GrpcTransactionManager

use of com.scalar.db.transaction.rpc.GrpcTransactionManager in project scalardb by scalar-labs.

the class DistributedTransactionServiceWithJdbcTransactionIntegrationTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
    ServerConfig serverConfig = ServerEnv.getServerConfigWithJdbc();
    if (serverConfig != null) {
        server = new ScalarDbServer(serverConfig);
        server.start();
    }
    GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
    StorageFactory factory = new StorageFactory(grpcConfig);
    admin = factory.getAdmin();
    createTable();
    manager = new GrpcTransactionManager(grpcConfig);
}
Also used : StorageFactory(com.scalar.db.service.StorageFactory) GrpcTransactionManager(com.scalar.db.transaction.rpc.GrpcTransactionManager) GrpcConfig(com.scalar.db.storage.rpc.GrpcConfig) BeforeClass(org.junit.BeforeClass)

Example 2 with GrpcTransactionManager

use of com.scalar.db.transaction.rpc.GrpcTransactionManager in project scalardb by scalar-labs.

the class DistributedTransactionServiceWithConsensusCommitIntegrationTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
    ServerConfig serverConfig = ServerEnv.getServerConfig();
    if (serverConfig != null) {
        server = new ScalarDbServer(serverConfig);
        server.start();
    }
    GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
    StorageFactory factory = new StorageFactory(grpcConfig);
    admin = factory.getAdmin();
    consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
    createTables(admin, consensusCommitAdmin);
    manager = new GrpcTransactionManager(grpcConfig);
}
Also used : ConsensusCommitConfig(com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig) StorageFactory(com.scalar.db.service.StorageFactory) GrpcTransactionManager(com.scalar.db.transaction.rpc.GrpcTransactionManager) GrpcConfig(com.scalar.db.storage.rpc.GrpcConfig) ConsensusCommitAdmin(com.scalar.db.transaction.consensuscommit.ConsensusCommitAdmin) BeforeClass(org.junit.BeforeClass)

Example 3 with GrpcTransactionManager

use of com.scalar.db.transaction.rpc.GrpcTransactionManager in project scalardb by scalar-labs.

the class DistributedTransactionServiceWithConsensusCommitWithExtraReadIntegrationTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
    ServerConfig serverConfig = ServerEnv.getServerConfig(Isolation.SERIALIZABLE, SerializableStrategy.EXTRA_READ);
    if (serverConfig != null) {
        server = new ScalarDbServer(serverConfig);
        server.start();
    }
    GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
    StorageFactory factory = new StorageFactory(grpcConfig);
    admin = factory.getAdmin();
    consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
    createTables(admin, consensusCommitAdmin);
    manager = new GrpcTransactionManager(grpcConfig);
}
Also used : ConsensusCommitConfig(com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig) StorageFactory(com.scalar.db.service.StorageFactory) GrpcTransactionManager(com.scalar.db.transaction.rpc.GrpcTransactionManager) GrpcConfig(com.scalar.db.storage.rpc.GrpcConfig) ConsensusCommitAdmin(com.scalar.db.transaction.consensuscommit.ConsensusCommitAdmin) BeforeClass(org.junit.BeforeClass)

Example 4 with GrpcTransactionManager

use of com.scalar.db.transaction.rpc.GrpcTransactionManager in project scalardb by scalar-labs.

the class DistributedTransactionServiceWithConsensusCommitWithExtraWriteIntegrationTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
    ServerConfig serverConfig = ServerEnv.getServerConfig(Isolation.SERIALIZABLE, SerializableStrategy.EXTRA_WRITE);
    if (serverConfig != null) {
        server = new ScalarDbServer(serverConfig);
        server.start();
    }
    GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
    StorageFactory factory = new StorageFactory(grpcConfig);
    admin = factory.getAdmin();
    consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
    createTables(admin, consensusCommitAdmin);
    manager = new GrpcTransactionManager(grpcConfig);
}
Also used : ConsensusCommitConfig(com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig) StorageFactory(com.scalar.db.service.StorageFactory) GrpcTransactionManager(com.scalar.db.transaction.rpc.GrpcTransactionManager) GrpcConfig(com.scalar.db.storage.rpc.GrpcConfig) ConsensusCommitAdmin(com.scalar.db.transaction.consensuscommit.ConsensusCommitAdmin) BeforeClass(org.junit.BeforeClass)

Aggregations

StorageFactory (com.scalar.db.service.StorageFactory)4 GrpcConfig (com.scalar.db.storage.rpc.GrpcConfig)4 GrpcTransactionManager (com.scalar.db.transaction.rpc.GrpcTransactionManager)4 BeforeClass (org.junit.BeforeClass)4 ConsensusCommitAdmin (com.scalar.db.transaction.consensuscommit.ConsensusCommitAdmin)3 ConsensusCommitConfig (com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig)3