@Override public void readFully(byte[] b, int off, int len) throws IOException { buf.get(offset, b, off, len); offset += len; }
@Override public boolean tombstone( BolBuffer rawEntrys) { return rawEntrys.get(4 + rawEntrys.getInt(0) + 8) != 0; }
public static int compare(BolBuffer left, BolBuffer right) { int leftLength = left.length; int rightLength = right.length; int minLength = Math.min(leftLength, rightLength); int minWords = minLength / 8; int i; for (i = 0; i < minWords * 8; i += 8) { long result = left.getLong(i); long rw = right.getLong(i); if (result != rw) { return UnsignedLongs.compare(result, rw); } } for (i = minWords * 8; i < minLength; ++i) { int var11 = UnsignedBytes.compare(left.get(i), right.get(i)); if (var11 != 0) { return var11; } } return leftLength - rightLength; }
@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); }
@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 int readUnsignedByte() throws IOException { int b = buf.get(offset) & 0xFF; offset++; return b; }
@Override public boolean tombstone( BolBuffer rawEntrys) { return rawEntrys.get(keyLength + 8) != 0; }
@Override public boolean readBoolean() throws IOException { int ch = buf.get(offset) & 0xFF; offset++; return (ch != 0); }
@Override public byte readByte() throws IOException { byte b = buf.get(offset); offset++; return b; }
if (equal1) { for (int i = 0; i < metaValue.length; i++) { if (configAsBytes[i] != metaValue.get(i)) { equal1 = false; break;