Examples of ODistributedVersion


Examples of com.orientechnologies.orient.core.version.ODistributedVersion

      json.writeAttribute(firstAttribute ? settings.indentLevel : 0, firstAttribute, ODocumentHelper.ATTRIBUTE_VERSION, record
          .getRecordVersion().getCounter());
      if (settings.attribSameRow)
        firstAttribute = false;
      if (OGlobalConfiguration.DB_USE_DISTRIBUTED_VERSION.getValueAsBoolean()) {
        final ODistributedVersion ver = (ODistributedVersion) record.getRecordVersion();
        json.writeAttribute(firstAttribute ? settings.indentLevel : 0, firstAttribute, ODocumentHelper.ATTRIBUTE_VERSION_TIMESTAMP,
            ver.getTimestamp());
        json.writeAttribute(firstAttribute ? settings.indentLevel : 0, firstAttribute,
            ODocumentHelper.ATTRIBUTE_VERSION_MACADDRESS, ver.getMacAddress());
      }
    }
    if (settings.includeClazz && record instanceof ODocument && ((ODocument) record).getClassName() != null) {
      json.writeAttribute(firstAttribute ? settings.indentLevel : 0, firstAttribute, ODocumentHelper.ATTRIBUTE_CLASS,
          ((ODocument) record).getClassName());
View Full Code Here

Examples of com.orientechnologies.orient.core.version.ODistributedVersion

    writeClusterPosition(iRID.getClusterPosition());
  }

  public void writeVersion(final ORecordVersion version) throws IOException {
    if (version instanceof ODistributedVersion) {
      final ODistributedVersion v = (ODistributedVersion) version;
      writeInt(v.getCounter());
      writeLong(v.getTimestamp());
      writeLong(v.getMacAddress());
    } else {
      // Usual serialization
      writeInt(version.getCounter());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.