use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class StandardTransactionIdSerializer method write.
@Override
public void write(WriteBuffer buffer, StandardTransactionId attribute) {
DataOutput out = (DataOutput) buffer;
out.writeObjectNotNull(attribute.getInstanceId());
out.writeObjectNotNull(attribute.getTransactionId());
out.writeObjectNotNull(attribute.getTransactionTime());
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class SerializableSerializer method write.
@Override
public void write(WriteBuffer buffer, T attribute) {
DataOutput out = (DataOutput) buffer;
out.writeObjectNotNull(SerializationUtils.serialize(attribute));
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class TypeDefinitionDescriptionSerializer method write.
@Override
public void write(WriteBuffer buffer, TypeDefinitionDescription attribute) {
DataOutput out = (DataOutput) buffer;
out.writeObjectNotNull(attribute.getCategory());
out.writeClassAndObject(attribute.getModifier());
}
use of org.janusgraph.graphdb.database.serialize.DataOutput in project janusgraph by JanusGraph.
the class KCVSLog method writeMessage.
private Entry writeMessage(KCVSMessage msg) {
StaticBuffer content = msg.getContent();
DataOutput out = manager.serializer.getDataOutput(8 + 8 + manager.senderId.length() + 2 + content.length());
Instant rawTimestamp = msg.getTimestamp();
Preconditions.checkArgument(rawTimestamp.isAfter(Instant.EPOCH));
out.putLong(times.getTime(rawTimestamp));
out.writeObjectNotNull(manager.senderId);
out.putLong(numMsgCounter.incrementAndGet());
final int valuePos = out.getPosition();
out.putBytes(content);
return new StaticArrayEntry(out.getStaticBuffer(), valuePos);
}
Aggregations