com.palantir.atlasdb.transaction.api.TransactionManager.getTimelockService()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中com.palantir.atlasdb.transaction.api.TransactionManager.getTimelockService()方法的一些代码示例,展示了TransactionManager.getTimelockService()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TransactionManager.getTimelockService()方法的具体详情如下:
包路径:com.palantir.atlasdb.transaction.api.TransactionManager
类名称:TransactionManager
方法名:getTimelockService

TransactionManager.getTimelockService介绍

[英]Returns the timelock service used by this transaction manager.
[中]返回此事务管理器使用的timelock服务。

代码示例

代码示例来源:origin: palantir/atlasdb

public static Map<String, Object> execute(TransactionManager txnManager, int numClients,
    int requestsPerClient) {
  return new LockAndUnlockUncontendedBenchmark(txnManager.getTimelockService(), numClients,
      requestsPerClient).execute();
}

代码示例来源:origin: palantir/atlasdb

public static Map<String, Object> execute(TransactionManager txnManager, int numClients,
    int requestsPerClient, int numDistinctLocks) {
  return new LockAndUnlockContendedBenchmark(txnManager.getTimelockService(), numClients, requestsPerClient,
      numDistinctLocks).execute();
}

代码示例来源:origin: palantir/atlasdb

private boolean isInitializedInternal() {
  // Note that the PersistentLockService is also initialized asynchronously as part of
  // TransactionManagers.create; however, this is not required for the TransactionManager to fulfil
  // requests (note that it is not accessible from any TransactionManager implementation), so we omit
  // checking here whether it is initialized.
  return txManager.getKeyValueService().isInitialized()
      && txManager.getTimelockService().isInitialized()
      && txManager.getTimestampService().isInitialized()
      && txManager.getCleaner().isInitialized()
      && initializationPrerequisite.get();
}

代码示例来源:origin: palantir/atlasdb

private TargetedSweeper initializeAndGet(TargetedSweeper sweeper, TransactionManager txManager) {
  sweeper.initializeWithoutRunning(
      new SpecialTimestampsSupplier(txManager::getImmutableTimestamp, txManager::getImmutableTimestamp),
      txManager.getTimelockService(),
      txManager.getKeyValueService(),
      TransactionServices.createForTesting(
          txManager.getKeyValueService(), txManager.getTimestampService(), false),
      new TargetedSweepFollower(ImmutableList.of(FOLLOWER), txManager));
  sweeper.runInBackground();
  return sweeper;
}

代码示例来源:origin: palantir/atlasdb

public void initializeWithoutRunning(TransactionManager txManager) {
  initializeWithoutRunning(SpecialTimestampsSupplier.create(txManager),
      txManager.getTimelockService(),
      txManager.getKeyValueService(),
      TransactionServices.createTransactionService(txManager.getKeyValueService(),
          CoordinationServices.createDefault(
              txManager.getKeyValueService(),
              txManager.getTimestampService(),
              false)),
      new TargetedSweepFollower(followers, txManager));
}

代码示例来源:origin: com.palantir.atlasdb/atlasdb-impl-shared

private boolean isInitializedInternal() {
  // Note that the PersistentLockService is also initialized asynchronously as part of
  // TransactionManagers.create; however, this is not required for the TransactionManager to fulfil
  // requests (note that it is not accessible from any TransactionManager implementation), so we omit
  // checking here whether it is initialized.
  return txManager.getKeyValueService().isInitialized()
      && txManager.getTimelockService().isInitialized()
      && txManager.getTimestampService().isInitialized()
      && txManager.getCleaner().isInitialized()
      && initializationPrerequisite.get();
}

代码示例来源:origin: com.palantir.atlasdb/atlasdb-impl-shared

public void initializeWithoutRunning(TransactionManager txManager) {
  initializeWithoutRunning(SpecialTimestampsSupplier.create(txManager),
      txManager.getTimelockService(),
      txManager.getKeyValueService(),
      TransactionServices.createTransactionService(txManager.getKeyValueService(),
          CoordinationServices.createDefault(
              txManager.getKeyValueService(),
              txManager.getTimestampService(),
              false)),
      new TargetedSweepFollower(followers, txManager));
}

相关文章