use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class KCVSLog method getMarkerColumn.
/**
* ###################################
* Getting/setting Log Settings
* ###################################
*/
private StaticBuffer getMarkerColumn(int partitionId, int bucketId) {
DataOutput out = manager.serializer.getDataOutput(1 + 4 + 4);
out.putByte(MARKER_PREFIX);
out.putInt(partitionId);
out.putInt(bucketId);
return out.getStaticBuffer();
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class KCVSLog method getLogKey.
private StaticBuffer getLogKey(final int partitionId, final int bucketId, final int timeslice) {
Preconditions.checkArgument(partitionId >= 0 && partitionId < (1 << manager.partitionBitWidth));
Preconditions.checkArgument(bucketId >= 0 && bucketId < numBuckets);
DataOutput o = manager.serializer.getDataOutput(3 * 4);
// Offset to put significant bits in front
o.putInt((partitionId << (32 - manager.partitionBitWidth)));
o.putInt(bucketId);
o.putInt(timeslice);
return o.getStaticBuffer();
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class KCVSLog method getSettingKey.
private StaticBuffer getSettingKey(String identifier) {
DataOutput out = manager.serializer.getDataOutput(4 + 2 + identifier.length());
out.putInt(SYSTEM_PARTITION_ID);
out.writeObjectNotNull(identifier);
return out.getStaticBuffer();
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class KeyValueStoreUtil method getBuffer.
public static StaticBuffer getBuffer(String s) {
DataOutput out = serial.getDataOutput(50);
out.writeObjectNotNull(s);
return out.getStaticBuffer();
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class SerializerTest method getStringBuffer.
private StaticBuffer getStringBuffer(String value) {
DataOutput o = serialize.getDataOutput(value.length() + 10);
o.writeObject(value, String.class);
return o.getStaticBuffer();
}
Aggregations