@Test public void shouldThrowWhenTryingToStartIllegalNumberOfTransactions() { assertThatThrownBy(() -> transactionStarter.startIdentifiedAtlasDbTransactionBatch(0)) .isInstanceOf(SafeIllegalArgumentException.class) .hasMessage("Cannot start 0 or fewer transactions"); }
List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { Preconditions.checkArgument(count > 0, "Cannot start 0 or fewer transactions"); return AtlasFutures.getUnchecked(autobatcher.apply(count)); }
TransactionStarter implements AutoCloseable { List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { Preconditions.checkArgument(count > 0, "Cannot start 0 or fewer transactions"); return AtlasFutures.getUnchecked(autobatcher.apply(count)); } }
TransactionStarter implements AutoCloseable { List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { Preconditions.checkArgument(count > 0, "Cannot start 0 or fewer transactions"); return AtlasFutures.getUnchecked(autobatcher.apply(count)); } private  TransactionStarter(
            DisruptorAutobatcher<Integer, List<StartIdentifiedAtlasDbTransactionResponse>> autobatcher,
            LockLeaseService lockLeaseService); }
TransactionStarter implements AutoCloseable { List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { Preconditions.checkArgument(count > 0, "Cannot start 0 or fewer transactions"); return AtlasFutures.getUnchecked(autobatcher.apply(count)); } private  TransactionStarter(
            DisruptorAutobatcher<Integer, List<StartIdentifiedAtlasDbTransactionResponse>> autobatcher,
            LockLeaseService lockLeaseService); @Override void close(); }
TransactionStarter implements AutoCloseable { List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { Preconditions.checkArgument(count > 0, "Cannot start 0 or fewer transactions"); return AtlasFutures.getUnchecked(autobatcher.apply(count)); } private  TransactionStarter(
            DisruptorAutobatcher<Integer, List<StartIdentifiedAtlasDbTransactionResponse>> autobatcher,
            LockLeaseService lockLeaseService); @Override void close();  }