private long put(SerializableTransactionManager txm, TableReference table, String row, String val) { Cell cell = Cell.create(row.getBytes(StandardCharsets.UTF_8), COL.getBytes(StandardCharsets.UTF_8)); return txm.runTaskWithRetry(t -> { t.put(table, ImmutableMap.of(cell, val.getBytes(StandardCharsets.UTF_8))); return t.getTimestamp(); }); }
services.getTransactionManager().runTaskWithRetry((TxTask) t -> { SweepPriorityTable priorityTable = SweepTableFactory.of().getSweepPriorityTable(t); SweepPriorityTable.SweepPriorityRow row1 = SweepPriorityTable.SweepPriorityRow.of(
private <T> T runReadOnly(TransactionToken token, RuntimeTransactionTask<T> task) { if (token.shouldAutoCommit()) { return txManager.runTaskWithRetry(task); } else { RawTransaction tx = transactions.getIfPresent(token); Preconditions.checkNotNull(tx, "The given transaction does not exist."); return task.execute(tx); } }
private <T> T runWithRetry(TransactionToken token, RuntimeTransactionTask<T> task) { if (token.shouldAutoCommit()) { return txManager.runTaskWithRetry(task); } else { RawTransaction tx = transactions.getIfPresent(token); Preconditions.checkNotNull(tx, "The given transaction does not exist."); return task.execute(tx); } }
services.getTransactionManager().runTaskWithRetry((TxTask) t -> { SweepPriorityTable priorityTable = SweepTableFactory.of().getSweepPriorityTable(t); SweepPriorityTable.SweepPriorityRow row1 = SweepPriorityTable.SweepPriorityRow.of(