public synchronized TimestampTracker getTimestampTracker() { checkIfClosed(); if (tsTracker == null) { tsTracker = new TimestampTracker(env, getTransactorID()); } return tsTracker; }
void deleteWeakRow() { if (weakNotification != null) { env.getSharedResources().getBatchWriter() .writeMutation(weakNotification.newDelete(env, startTs)); } }
@Override public void commit() { super.commit(); // wait for any async mutations that transaction write to flush env.getSharedResources().getBatchWriter().waitForAsyncFlush(); } };
private static Stamp allocateTimestamp(Environment env) { return env.getSharedResources().getTimestampTracker().allocateTimestamp(); }
/** * Retrieves transactor ID by first getting/creating transactor (which is only done until * necessary) */ private Long getTransactorID() { if (tnode == null) { tnode = env.getSharedResources().getTransactorNode(); } return tnode.getTransactorID().getLongID(); }
public CommitData createCommitData() { CommitData cd = new CommitData(); cd.cw = env.getSharedResources().getConditionalWriter(); cd.bulkCw = env.getSharedResources().getBulkConditionalWriter(); return cd; }
GcTimestampTracker() throws Exception { this.curator = env.getSharedResources().getCurator(); }
static ColumnVisibility gv(Environment env, Column col) { return env.getSharedResources().getVisCache().getCV(col); }
@Override public MetricRegistry getMetricRegistry() { return env.getSharedResources().getMetricRegistry(); }
public synchronized TransactorID getTransactorID() { checkIfClosed(); if (tid == null) { tid = new TransactorID(env); } return tid; }
public TxInfo getTransactionInfo(final Bytes prow, final Column pcol, final long startTs) { return getTransactionInfo(new PrimaryRowColumn(prow, pcol, startTs)); }
private RowIterator getImpl(ScannerConfiguration config) { return new RowIteratorImpl(new SnapshotScanner(this.env, config, startTs, stats)); }
@Override protected void finalize() throws Throwable { // CHECKSTYLE:ON // TODO Log an error if transaction is not closed (See FLUO-486) close(false); }
@Override public Map<Column, Bytes> get(Bytes row, Set<Column> columns) { checkIfOpen(); return getImpl(row, columns); }
/** * Creates a transactor node using new transactor ID * * @param env Environment */ public TransactorNode(Environment env) { this(env, new TransactorID(env)); }
@Override public Configuration getAppConfiguration() { return env.getAppConfiguration(); } };
@Override public int weigh(PrimaryRowColumn key, TxInfo value) { return key.weight() + (value.lockValue == null ? 0 : value.lockValue.length) + 24; } }
@Override public long getStartTimestamp() { return tx.getStartTimestamp(); } }