@Test public void interruptingLocalLeaderElectionTerminates() throws IOException { Leaders.LocalPaxosServices localPaxosServices = Leaders.createAndRegisterLocalServices( metricsManager, environment, ImmutableLeaderConfig.builder() .localServer("https: .quorumSize(1) .addLeaders("https: .acceptorLogDir(temporaryFolder.newFolder()) .learnerLogDir(temporaryFolder.newFolder()) .build(), USER_AGENT); LeaderElectionService leader = localPaxosServices.leaderElectionService(); LockService lockService = LockServiceImpl.create(); LockService leadershipLock = AwaitingLeadershipProxy.newProxyInstance( LockService.class, () -> lockService, leader); LockService localOrRemoteLock = LocalOrRemoteProxy.newProxyInstance( LockService.class, leadershipLock, null, CompletableFuture.completedFuture(true)); try { Thread.currentThread().interrupt(); assertThatCode(localOrRemoteLock::currentTimeMillis) .as("proxy correctly handles interrupts") .isInstanceOf(SafeIllegalStateException.class); assertThat(Thread.currentThread().isInterrupted()); } finally { Thread.interrupted(); } }
public static ImmutableTransactionManagers.ConfigBuildStage builder() { return ImmutableTransactionManagers.builder(); }
TransactionManagers { public static ImmutableTransactionManagers.ConfigBuildStage builder() { return ImmutableTransactionManagers.builder(); } }
TransactionManagers { public static ImmutableTransactionManagers.ConfigBuildStage builder() { return ImmutableTransactionManagers.builder(); }  }
TransactionManagers { public static ImmutableTransactionManagers.ConfigBuildStage builder() { return ImmutableTransactionManagers.builder(); }  static ImmutableTransactionManagers.ConfigBuildStage builder(); static TransactionManager createInMemory(Schema schema); static TransactionManager createInMemory(Set<Schema> schemas); @JsonIgnore @Value.Derived TransactionManager serializable(); @Deprecated static LockAndTimestampServices createLockAndTimestampServicesForCli(
            MetricsManager metricsManager,
            AtlasDbConfig config,
            Refreshable<AtlasDbRuntimeConfig> runtimeConfigSupplier,
            Consumer<Object> env,
            Supplier<LockService> lock,
            Supplier<ManagedTimestampService> time,
            TimestampStoreInvalidator invalidator,
            String userAgent); }
TransactionManagers { public static ImmutableTransactionManagers.ConfigBuildStage builder() { return ImmutableTransactionManagers.builder(); }  static ImmutableTransactionManagers.ConfigBuildStage builder(); static TransactionManager createInMemory(Schema schema); static TransactionManager createInMemory(Set<Schema> schemas); @JsonIgnore @Value.Derived TransactionManager serializable(); @Deprecated static LockAndTimestampServices createLockAndTimestampServicesForCli(
            MetricsManager metricsManager,
            AtlasDbConfig config,
            Refreshable<AtlasDbRuntimeConfig> runtimeConfigSupplier,
            Consumer<Object> env,
            Supplier<LockService> lock,
            Supplier<ManagedTimestampService> time,
            TimestampStoreInvalidator invalidator,
            String userAgent); static final LockClient LOCK_CLIENT; }