public void acquireEdgeLock(StaticBuffer key, Entry entry) throws BackendException { acquiredLock = true; edgeStore.acquireLock(key, entry.getColumnAs(StaticBuffer.STATIC_FACTORY), entry.getValueAs(StaticBuffer.STATIC_FACTORY), storeTx); }
public void acquireIndexLock(StaticBuffer key, Entry entry) throws BackendException { acquiredLock = true; indexStore.acquireLock(key, entry.getColumnAs(StaticBuffer.STATIC_FACTORY), entry.getValueAs(StaticBuffer.STATIC_FACTORY), storeTx); }
public EntryList getSubset(final SliceQuery otherQuery, final EntryList otherResult) { assert otherQuery.subsumes(this); int pos = Collections.binarySearch(otherResult, sliceStart); if (pos < 0) pos = -pos - 1; final List<Entry> result = new ArrayList<>(); for (; pos < otherResult.size() && result.size() < getLimit(); pos++) { Entry e = otherResult.get(pos); if (e.getColumnAs(StaticBuffer.STATIC_FACTORY).compareTo(sliceEnd) < 0) result.add(e); else break; } return StaticArrayEntryList.of(result); }
final KeyValueEntry concatenate(StaticBuffer front, Entry entry) { return new KeyValueEntry(concatenate(front, entry.getColumnAs(StaticBuffer.STATIC_FACTORY)), entry.getValueAs(StaticBuffer.STATIC_FACTORY)); }
@Override public void mutate(StaticBuffer key, List<Entry> additions, List<StaticBuffer> deletions, StoreTransaction txh) throws BackendException { if (!deletions.isEmpty()) { for (StaticBuffer deletion : deletions) { StaticBuffer del = concatenate(key, deletion.as(StaticBuffer.STATIC_FACTORY)); store.delete(del, txh); } } if (!additions.isEmpty()) { for (Entry entry : additions) { StaticBuffer newKey = concatenate(key, entry.getColumnAs(StaticBuffer.STATIC_FACTORY)); store.insert(newKey, entry.getValueAs(StaticBuffer.STATIC_FACTORY), txh); } } }
private Map<String,Object> toMap() { Map<String,Object> entries = Maps.newHashMap(); List<Entry> result = BackendOperation.execute(new BackendOperation.Transactional<List<Entry>>() { @Override public List<Entry> call(StoreTransaction txh) throws BackendException { return store.getSlice(new KeySliceQuery(rowKey, BufferUtil.zeroBuffer(1), BufferUtil.oneBuffer(128)),txh); } @Override public String toString() { return "setConfiguration"; } },txProvider, times, maxOperationWaitTime); for (Entry entry : result) { String key = staticBuffer2String(entry.getColumnAs(StaticBuffer.STATIC_FACTORY)); Object value = staticBuffer2Object(entry.getValueAs(StaticBuffer.STATIC_FACTORY), Object.class); entries.put(key,value); } return entries; }
final StaticBuffer actualCol = e.getColumnAs(StaticBuffer.STATIC_FACTORY); assert null != actualCol; assert null != kc.getColumn();
e -> serializer.fromLockColumn(e.getColumnAs(StaticBuffer.STATIC_FACTORY), times));
if (target.equals(blocks.get(0).getColumnAs(StaticBuffer.STATIC_FACTORY))) {
private void addColumnToPut(Put p, byte[] cfName, long putTimestamp, Entry e) { p.addColumn(cfName, e.getColumnAs(StaticBuffer.ARRAY_FACTORY), putTimestamp, e.getValueAs(StaticBuffer.ARRAY_FACTORY)); }