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); }
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(timeUnit), rid); 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); }
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); }
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); }