com.scalar.db.transaction.consensuscommit.ConsensusCommitProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalardb Show documentation
Show all versions of scalardb Show documentation
A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases
package com.scalar.db.transaction.consensuscommit;
import com.scalar.db.api.DistributedTransactionAdmin;
import com.scalar.db.api.DistributedTransactionManager;
import com.scalar.db.api.DistributedTransactionProvider;
import com.scalar.db.api.TwoPhaseCommitTransactionManager;
import com.scalar.db.config.DatabaseConfig;
public class ConsensusCommitProvider implements DistributedTransactionProvider {
@Override
public String getName() {
return "consensus-commit";
}
@Override
public DistributedTransactionManager createDistributedTransactionManager(DatabaseConfig config) {
return new ConsensusCommitManager(config);
}
@Override
public DistributedTransactionAdmin createDistributedTransactionAdmin(DatabaseConfig config) {
return new ConsensusCommitAdmin(config);
}
@Override
public TwoPhaseCommitTransactionManager createTwoPhaseCommitTransactionManager(
DatabaseConfig config) {
return new TwoPhaseConsensusCommitManager(config);
}
}