Exemplo n.º 1
0
  /** @since 4.0 */
  protected void writeSystemValues(CDODataOutput out) throws IOException {
    EClass eClass = getEClass();
    CDOClassifierRef classRef = new CDOClassifierRef(eClass);

    if (TRACER.isEnabled()) {
      TRACER.format(
          "Writing revision: ID={0}, className={1}, version={2}, branchPoint={3}, revised={4}, resource={5}, container={6}, featureID={7}", //$NON-NLS-1$
          id,
          eClass.getName(),
          getVersion(),
          branchPoint,
          revised,
          resourceID,
          containerID,
          containingFeatureID);
    }

    out.writeCDOClassifierRef(classRef);
    out.writeCDOID(id);
    out.writeCDOBranchPoint(branchPoint);
    out.writeInt(getVersion());
    if (!id.isTemporary()) {
      out.writeLong(revised);
    }

    out.writeCDOID(resourceID);
    out.writeCDOID(out.getIDProvider().provideCDOID(containerID));
    out.writeInt(containingFeatureID);
  }
Exemplo n.º 2
0
  @Override
  protected void requesting(CDODataOutput out) throws IOException {
    out.writeInt(viewID);
    out.writeCDOLockType(lockType);
    out.writeBoolean(recursive);
    if (objectIDs == null) {
      if (TRACER.isEnabled()) {
        TRACER.format("Unlocking all objects for view {0}", viewID); // $NON-NLS-1$
      }

      out.writeInt(CDOProtocolConstants.RELEASE_ALL_LOCKS);
    } else {
      if (TRACER.isEnabled()) {
        TRACER.format(
            "Unlocking of type {0} requested for view {1}",
            lockType == LockType.READ
                ? "read" //$NON-NLS-1$ //$NON-NLS-2$
                : "write",
            viewID); //$NON-NLS-1$
      }

      out.writeInt(objectIDs.size());
      for (CDOID id : objectIDs) {
        if (TRACER.isEnabled()) {
          TRACER.format("Unlocking requested for object {0}", id); // $NON-NLS-1$
        }

        out.writeCDOID(id);
      }
    }
  }
  @Override
  protected void requesting(CDODataOutput out, OMMonitor monitor) throws IOException {
    out.writeInt(viewID);
    out.writeCDOBranchPoint(branchPoint);

    out.writeInt(invalidObjects.size());
    for (InternalCDOObject object : invalidObjects) {
      out.writeCDOID(object.cdoID());
    }
  }
Exemplo n.º 4
0
  @Override
  protected void responding(CDODataOutput out, OMMonitor monitor) throws IOException {
    out.writeInt(allChangedObjects.size());
    for (CDORevisionDelta delta : allChangedObjects) {
      out.writeCDORevisionDelta(delta);
    }

    out.writeInt(allDetachedObjects.size());
    for (CDOID id : allDetachedObjects) {
      out.writeCDOID(id);
    }
  }
Exemplo n.º 5
0
  @Override
  protected void requesting(CDODataOutput out) throws IOException {
    out.writeInt(viewID);
    out.writeCDOLockType(lockType);
    out.writeBoolean(recursive);
    out.writeLong(timeout);

    out.writeInt(revisionKeys.size());
    for (CDORevisionKey revKey : revisionKeys) {
      out.writeCDORevisionKey(revKey);
    }
  }