use of com.palantir.atlasdb.transaction.api.AtlasDbConstraintCheckingMode in project atlasdb by palantir.
the class SweepTestUtils method setupTxManager.
public static SerializableTransactionManager setupTxManager(KeyValueService kvs, TimestampService tsService, SweepStrategyManager ssm, TransactionService txService) {
LockClient lockClient = LockClient.of("sweep client");
LockService lockService = LockServiceImpl.create(LockServerOptions.builder().isStandaloneServer(false).build());
Supplier<AtlasDbConstraintCheckingMode> constraints = () -> AtlasDbConstraintCheckingMode.NO_CONSTRAINT_CHECKING;
ConflictDetectionManager cdm = ConflictDetectionManagers.createWithoutWarmingCache(kvs);
Cleaner cleaner = new NoOpCleaner();
SerializableTransactionManager txManager = SerializableTransactionManager.createForTest(kvs, tsService, lockClient, lockService, txService, constraints, cdm, ssm, cleaner, AbstractTransactionTest.GET_RANGES_THREAD_POOL_SIZE, AbstractTransactionTest.DEFAULT_GET_RANGES_CONCURRENCY, () -> AtlasDbConstants.DEFAULT_TIMESTAMP_CACHE_SIZE, InMemorySweepQueue.writer());
setupTables(kvs);
return txManager;
}
use of com.palantir.atlasdb.transaction.api.AtlasDbConstraintCheckingMode in project atlasdb by palantir.
the class TableTasksTest method setup.
@Before
public void setup() {
kvs = new InMemoryKeyValueService(true);
TimestampService tsService = new InMemoryTimestampService();
LockClient lockClient = LockClient.of("sweep client");
lockService = LockServiceImpl.create(LockServerOptions.builder().isStandaloneServer(false).build());
TransactionService txService = TransactionServices.createTransactionService(kvs);
Supplier<AtlasDbConstraintCheckingMode> constraints = Suppliers.ofInstance(AtlasDbConstraintCheckingMode.NO_CONSTRAINT_CHECKING);
ConflictDetectionManager cdm = ConflictDetectionManagers.createWithoutWarmingCache(kvs);
SweepStrategyManager ssm = SweepStrategyManagers.createDefault(kvs);
Cleaner cleaner = new NoOpCleaner();
SerializableTransactionManager transactionManager = SerializableTransactionManager.createForTest(kvs, tsService, lockClient, lockService, txService, constraints, cdm, ssm, cleaner, AbstractTransactionTest.GET_RANGES_THREAD_POOL_SIZE, AbstractTransactionTest.DEFAULT_GET_RANGES_CONCURRENCY, () -> AtlasDbConstants.DEFAULT_TIMESTAMP_CACHE_SIZE, MultiTableSweepQueueWriter.NO_OP);
txManager = transactionManager;
}
Aggregations