@Override public BolBuffer key( BolBuffer rawEntry, BolBuffer keyBuffer) { rawEntry.sliceInto(0, keyLength, keyBuffer); return keyBuffer; }
@Override public BolBuffer key( BolBuffer rawEntry, BolBuffer keyBuffer) { rawEntry.sliceInto(0, keyLength, keyBuffer); return keyBuffer; }
@Override public BolBuffer key( BolBuffer rawEntry, BolBuffer keyBuffer) { int length = rawEntry.getInt(0); rawEntry.sliceInto(4, length, keyBuffer); return keyBuffer; }
@Override public BolBuffer key( BolBuffer rawEntry, BolBuffer keyBuffer) { rawEntry.sliceInto(4, rawEntry.getInt(0), keyBuffer); return keyBuffer; }
@Override public boolean streamRawEntry(int index, BolBuffer rawEntry, BolBuffer keyBuffer, BolBuffer valueBuffer, ValueStream stream) throws Exception { if (rawEntry == null) { return stream.stream(index, null, -1, false, -1, null); } BolBuffer key = rawEntry.sliceInto(0, keyLength, keyBuffer); BolBuffer payload = null; if (valueBuffer != null) { payload = rawEntry.sliceInto(keyLength, payloadLength, valueBuffer); } return stream.stream(index, key, 0, false, 0, payload); }
@Override public boolean streamRawEntry(int index, BolBuffer rawEntry, BolBuffer keyBuffer, BolBuffer valueBuffer, ValueStream stream) throws Exception { if (rawEntry == null) { return stream.stream(index, null, -1, false, -1, null); } int keyLength = rawEntry.getInt(0); BolBuffer key = rawEntry.sliceInto(4, keyLength, keyBuffer); BolBuffer payload = null; if (valueBuffer != null) { int payloadLength = rawEntry.getInt(4 + keyLength); if (payloadLength >= 0) { payload = rawEntry.sliceInto(4 + keyLength + 4, payloadLength, valueBuffer); } } return stream.stream(index, key, 0, false, 0, payload); }
@Override public boolean streamRawEntry(int index, BolBuffer rawEntry, BolBuffer keyBuffer, BolBuffer valueBuffer, ValueStream stream) throws Exception { if (rawEntry == null) { return stream.stream(index, null, -1, false, -1, null); } BolBuffer key = rawEntry.sliceInto(0, keyLength, keyBuffer); long timestamp = rawEntry.getLong( keyLength); boolean tombstone = rawEntry.get( keyLength + 8) != 0; long version = rawEntry.getLong(keyLength + 8 + 1); BolBuffer payload = null; if (valueBuffer != null) { int payloadLength = rawEntry.getInt(keyLength + 8 + 1 + 8); if (payloadLength >= 0) { payload = rawEntry.sliceInto( keyLength + 8 + 1 + 8 + 4, payloadLength, valueBuffer); } } return stream.stream(index, key, timestamp, tombstone, version, payload); }
@Override public boolean streamRawEntry(int index, BolBuffer rawEntry, BolBuffer keyBuffer, BolBuffer valueBuffer, ValueStream stream) throws Exception { if (rawEntry == null) { return stream.stream(index, null, -1, false, -1, null); } int keyLength = rawEntry.getInt(0); BolBuffer key = rawEntry.sliceInto(4, keyLength, keyBuffer); long timestamp = rawEntry.getLong(4 + keyLength); boolean tombstone = rawEntry.get(4 + keyLength + 8) != 0; long version = rawEntry.getLong(4 + keyLength + 8 + 1); BolBuffer payload = null; if (valueBuffer != null) { int payloadLength = rawEntry.getInt(4 + keyLength + 8 + 1 + 8); if (payloadLength >= 0) { payload = rawEntry.sliceInto(4 + keyLength + 8 + 1 + 8 + 4, payloadLength, valueBuffer); } } return stream.stream(index, key, timestamp, tombstone, version, payload); }