private WriteResult tryDeleteLockOnce(StaticBuffer key, StaticBuffer col, StoreTransaction txh) { Throwable t = null; final Timer delTimer = times.getTimer().start(); try { StoreTransaction newTx = overrideTimestamp(txh, delTimer.getStartTime()); store.mutate(key, ImmutableList.<Entry>of(), Arrays.asList(col), newTx); } catch (BackendException e) { t = e; } delTimer.stop(); return new WriteResult(delTimer.elapsed(), delTimer.getStartTime(), null, t); }
@Override public Timer getTimer() { return new Timer(this); }
@Override public Timer getTimer() { return new Timer(this); }
private WriteResult tryWriteLockOnce(StaticBuffer key, StaticBuffer del, StoreTransaction txh) { Throwable t = null; final Timer writeTimer = times.getTimer().start(); StaticBuffer newLockCol = serializer.toLockCol(writeTimer.getStartTime(), rid, times); Entry newLockEntry = StaticArrayEntry.of(newLockCol, zeroBuf); try { StoreTransaction newTx = overrideTimestamp(txh, writeTimer.getStartTime()); store.mutate(key, Arrays.asList(newLockEntry), null == del ? KeyColumnValueStore.NO_DELETIONS : Arrays.asList(del), newTx); } catch (BackendException e) { log.debug("Lock write attempt failed with exception", e); t = e; } writeTimer.stop(); return new WriteResult(writeTimer.elapsed(), writeTimer.getStartTime(), newLockCol, t); }
TitanGraphIndex idx; Timer t = new Timer(TimestampProviders.MILLI).start(); boolean timedOut; while (true) { } else { LOGGER.info("All {} key(s) on index {} have status {}", converged.size(), graphIndexName, status); return new GraphIndexStatusReport(true, graphIndexName, status, notConverged, converged, t.elapsed()); timedOut = null != timeout && 0 < t.elapsed().compareTo(timeout); return new GraphIndexStatusReport(false, graphIndexName, status, notConverged, converged, t.elapsed());
@Override public Timer getTimer() { return new Timer(this); }
Preconditions.checkArgument(idNamespace>=0); //can be any non-negative value final Timer methodTime = times.getTimer().start(); "Block size [%s] is larger than upper bound [%s] for bit width [%s]",blockSize,idBlockUpperBound,uniqueIdBitWidth); while (methodTime.elapsed().compareTo(timeout) < 0) { final int uniquePID = getUniquePartitionID(); final StaticBuffer partitionKey = getPartitionKey(partition,idNamespace,uniquePID); Timer writeTimer = times.getTimer().start(); target = getBlockApplication(nextEnd, writeTimer.getStartTime()); final StaticBuffer finalTarget = target; // copy for the inner class BackendOperation.execute(new BackendOperation.Transactional<Boolean>() { writeTimer.stop(); Duration writeElapsed = writeTimer.elapsed(); if (idApplicationWaitMS.compareTo(writeElapsed) < 0) { throw new TemporaryBackendException("Wrote claim for id block [" + nextStart + ", " + nextEnd + ") in " + (writeElapsed) + " => too slow, threshold is: " + idApplicationWaitMS); timeout, methodTime.toString(), partition, idNamespace));
Timer t = new Timer(TimestampProviders.MILLI).start(); boolean timedOut; while (true) { LOGGER.info("Index {} (relation type {}) has status {}", relationIndexName, relationTypeName, actualStatus); if (status.equals(actualStatus)) { return new RelationIndexStatusReport(true, relationIndexName, relationTypeName, actualStatus, status, t.elapsed()); timedOut = null != timeout && 0 < t.elapsed().compareTo(timeout); return new RelationIndexStatusReport(false, relationIndexName, relationTypeName, actualStatus, status, t.elapsed());
private WriteResult tryDeleteLockOnce(StaticBuffer key, StaticBuffer col, StoreTransaction txh) { Throwable t = null; final Timer delTimer = times.getTimer().start(); try { StoreTransaction newTx = overrideTimestamp(txh, delTimer.getStartTime()); store.mutate(key, ImmutableList.<Entry>of(), Arrays.asList(col), newTx); } catch (BackendException e) { t = e; } delTimer.stop(); return new WriteResult(delTimer.elapsed(), delTimer.getStartTime(), null, t); }
private WriteResult tryDeleteLockOnce(StaticBuffer key, StaticBuffer col, StoreTransaction txh) { Throwable t = null; final Timer delTimer = times.getTimer().start(); try { StoreTransaction newTx = overrideTimestamp(txh, delTimer.getStartTime()); store.mutate(key, ImmutableList.<Entry>of(), Arrays.asList(col), newTx); } catch (BackendException e) { t = e; } delTimer.stop(); return new WriteResult(delTimer.elapsed(), delTimer.getStartTime(), null, t); }
private WriteResult tryWriteLockOnce(StaticBuffer key, StaticBuffer del, StoreTransaction txh) { Throwable t = null; final Timer writeTimer = times.getTimer().start(); StaticBuffer newLockCol = serializer.toLockCol(writeTimer.getStartTime(), rid, times); Entry newLockEntry = StaticArrayEntry.of(newLockCol, zeroBuf); try { StoreTransaction newTx = overrideTimestamp(txh, writeTimer.getStartTime()); store.mutate(key, Arrays.asList(newLockEntry), null == del ? KeyColumnValueStore.NO_DELETIONS : Arrays.asList(del), newTx); } catch (BackendException e) { log.debug("Lock write attempt failed with exception", e); t = e; } writeTimer.stop(); return new WriteResult(writeTimer.elapsed(), writeTimer.getStartTime(), newLockCol, t); }