use of org.janusgraph.diskstorage.util.WriteByteBuffer in project janusgraph by JanusGraph.
the class ConsistentKeyLockerSerializer method toLockCol.
public StaticBuffer toLockCol(Instant ts, StaticBuffer rid, TimestampProvider provider) {
WriteBuffer b = new WriteByteBuffer(rid.length() + 8);
b.putLong(provider.getTime(ts));
WriteBufferUtil.put(b, rid);
return b.getStaticBuffer();
}
use of org.janusgraph.diskstorage.util.WriteByteBuffer in project janusgraph by JanusGraph.
the class StaticArrayEntryTest method testTTLMetadata.
@Test
public void testTTLMetadata() {
WriteBuffer wb = new WriteByteBuffer(128);
wb.putInt(1).putInt(2).putInt(3).putInt(4);
int valuePos = wb.getPosition();
wb.putInt(5).putInt(6);
StaticArrayEntry entry = new StaticArrayEntry(wb.getStaticBuffer(), valuePos);
entry.setMetaData(EntryMetaData.TTL, 42);
assertEquals(42, entry.getMetaData().get(EntryMetaData.TTL));
}
Aggregations