예제 #1
0
 private static void writeAttribute(DataOutput out, TitanProperty property) {
   Object attribute = property.getAttribute();
   TitanKey key = (TitanKey) property.getType();
   assert attribute != null;
   assert key.getDataType().isInstance(attribute);
   if (hasGenericDataType(key)) {
     out.writeClassAndObject(attribute);
   } else {
     out.writeObjectNotNull(attribute);
   }
 }
예제 #2
0
 private ByteBuffer getIndexValue(TitanProperty prop) {
   assert prop.getType().isSimple();
   return VariableLong.positiveByteBuffer(prop.getVertex().getID());
 }