use of com.thinkaurelius.titan.diskstorage.util.WriteByteBuffer in project titan by thinkaurelius.
the class VariableLong method positiveByteBuffer.
public static StaticBuffer positiveByteBuffer(final long value) {
WriteBuffer buffer = new WriteByteBuffer(positiveLength(value));
writePositive(buffer, value);
return buffer.getStaticBuffer();
}
use of com.thinkaurelius.titan.diskstorage.util.WriteByteBuffer in project titan by thinkaurelius.
the class VariableLong method positiveByteBuffer.
public static StaticBuffer positiveByteBuffer(long[] value) {
int len = 0;
for (long aValue : value) len += positiveLength(aValue);
WriteBuffer buffer = new WriteByteBuffer(len);
for (long aValue : value) writePositive(buffer, aValue);
return buffer.getStaticBuffer();
}
use of com.thinkaurelius.titan.diskstorage.util.WriteByteBuffer in project titan by thinkaurelius.
the class ConsistentKeyLockerSerializer method toLockKey.
public StaticBuffer toLockKey(StaticBuffer key, StaticBuffer column) {
WriteBuffer b = new WriteByteBuffer(key.length() + column.length() + 4);
b.putInt(key.length());
WriteBufferUtil.put(b, key);
WriteBufferUtil.put(b, column);
return b.getStaticBuffer();
}
Aggregations