Copy sorted records to UpdateScan

@param s
the target scan
@return true if still record in TempRecordPage
769797
public boolean copyToScan(UpdateScan s) {
		if (!this.next())
			return false;
		s.insert();
		for (String fldName : sch.fields()) {
			s.setVal(fldName, this.getVal(fldName));
		}
		return true;
	}
923207
public void updateRecord(final ORecordInternal<?> record) {
    if (isEnabled() && record.getIdentity().getClusterId() != excludedCluster && record.getIdentity().isValid()) {
      underlying.lock(record.getIdentity());
      try {
        if (underlying.get(record.getIdentity()) != record)
          underlying.put(record);
      } finally {
        underlying.unlock(record.getIdentity());
      }
    }

    secondary.updateRecord(record);
  }
686573
SnapshotDescriptor copyTo(Buffer buffer) {
    this.buffer = buffer
        .writeLong(index)
        .writeLong(timestamp)
        .writeInt(version)
        .writeBoolean(locked)
        .skip(BYTES - buffer.position())
        .flush();
    return this;
  }
700327
private Iterator<Record> recordScan(DeltaPlacement placement, AstyanaxTable table, ByteBufferRange keyRange,
                                        ReadConsistency consistency) {

        Iterator<Iterable<Row>> rowGroups = rowScan(placement, table, keyRange, consistency);
        return decodeRows(rowGroups, table, placement);
    }
186486
def should_copy(column):
    
    if not isinstance(column.type, Serial):
        return True

    if column.nullable:
        return True

    if not column.server_default:
        return True

    # do not create temporary serial values; they will be defaulted on upsert/insert
    return False
476256
@SuppressWarnings("unchecked")
public void copy(Copier from)
   {
      if(!(from instanceof Topic))
      {
         return;
      }
      
      Topic<T> topic = (Topic<T>)from;
      this.name = topic.name;
      this.observerMap = topic.observerMap;
   }
297164
public void updateMetricsRecord() {
    for (Map.Entry<MetricName, Long> entry: counters.entrySet()) {
      String name = (entry.getKey() + "_" + type).toLowerCase();
      record.setMetric(name, entry.getValue());
    }
    record.update();
  }
1051310
public Rec updateRecord(Rec record, boolean bRefresh)
    {
        try {
            Object bookmark = null;
            if (record.getEditMode() == Constant.EDIT_IN_PROGRESS)
            {
                if (bRefresh)
                    bookmark = record.getTable().getHandle(0);
                record.getTable().set(record);
            }
            else if ((record.getEditMode() == Constant.EDIT_ADD) && (record.isModified()))
            {
                record.getTable().add(record);
                if (bRefresh)
                    bookmark = record.getTable().getLastModified(0);
            }
            if (bRefresh)
                if (bookmark != null)
                {
                    record.getTable().setHandle(bookmark, 0);
                    record.getTable().edit();
                }
        } catch (DBException ex) {
            ex.printStackTrace();
            if (record != null)
                if (record.getTask() != null)
                    record.getTask().setLastError(ex.getMessage());
            return null;
        }
        return record;
    }
744267
public void copyBufferStateFrom(WstxInputData src)
    {
        mInputBuffer = src.mInputBuffer;
        mInputPtr = src.mInputPtr;
        mInputEnd = src.mInputEnd;

        mCurrInputProcessed = src.mCurrInputProcessed;
        mCurrInputRow = src.mCurrInputRow;
        mCurrInputRowStart = src.mCurrInputRowStart;
    }
632769
@SuppressWarnings("unchecked")
	protected void copySRE() {
		final IStructuredSelection selection = (IStructuredSelection) this.sresList.getSelection();
		final Iterator<ISREInstall> it = selection.iterator();

		final List<ISREInstall> newEntries = new ArrayList<>();
		while (it.hasNext()) {
			final ISREInstall selectedSRE = it.next();

			final ISREInstall copy = selectedSRE.copy(createUniqueIdentifier());
			copy.setName(createUniqueName(selectedSRE.getName()));

			final EditSREInstallWizard wizard = new EditSREInstallWizard(
					copy, this.sreArray.toArray(new ISREInstall[this.sreArray.size()]));
			final WizardDialog dialog = new WizardDialog(getShell(), wizard);
			final int dlgResult = dialog.open();
			if (dlgResult == Window.OK) {
				newEntries.add(copy);
			} else {
				assert dlgResult == Window.CANCEL;
				// Canceling one wizard should cancel all subsequent wizards
				break;
			}
		}
		if (!newEntries.isEmpty()) {
			this.sreArray.addAll(newEntries);
			refreshSREListUI();
			this.sresList.setSelection(new StructuredSelection(newEntries.toArray()));
		} else {
			this.sresList.setSelection(selection);
		}
		this.sresList.refresh(true);
		updateUI();
	}
723193
@Override
    public synchronized void update(WSStats newStats, boolean keepOld, boolean recursiveUpdate) {
        if (newStats == null)
            return;

        StatsImpl newStats1 = (StatsImpl) newStats;
        // check if they are same Stats
        if (!name.equals(newStats1.getName()) || type != newStats1.getType())
            return;

        myupdate(newStats1, keepOld, recursiveUpdate);
    }
1238113
@Override
  public void copy(
      String srcBucketName, List<String> srcObjectNames,
      String dstBucketName, List<String> dstObjectNames)
      throws IOException {
    validateCopyArguments(srcBucketName, srcObjectNames, dstBucketName, dstObjectNames, this);

    if (srcObjectNames.isEmpty()) {
      return;
    }

    // Gather FileNotFoundExceptions for individual objects,
    // but only throw a single combined exception at the end.
    KeySetView<IOException, Boolean> innerExceptions = ConcurrentHashMap.newKeySet();

    // Perform the copy operations.
    BatchHelper batchHelper =
        batchFactory.newBatchHelper(
            httpRequestInitializer,
            gcs,
            storageOptions.getCopyMaxRequestsPerBatch(),
            srcObjectNames.size(),
            storageOptions.getCopyBatchThreads());

    for (int i = 0; i < srcObjectNames.size(); i++) {
      if (storageOptions.isCopyWithRewriteEnabled()) {
        // Rewrite request has the same effect as Copy, but it can handle moving
        // large objects that may potentially timeout a Copy request.
        rewriteInternal(
            batchHelper,
            innerExceptions,
            srcBucketName, srcObjectNames.get(i),
            dstBucketName, dstObjectNames.get(i));
      } else {
        copyInternal(
            batchHelper,
            innerExceptions,
            srcBucketName, srcObjectNames.get(i),
            dstBucketName, dstObjectNames.get(i));
      }
    }

    // Execute any remaining requests not divisible by the max batch size.
    batchHelper.flush();

    if (!innerExceptions.isEmpty()) {
      throw GoogleCloudStorageExceptions.createCompositeException(innerExceptions);
    }
  }
469029
@Override
  public boolean hasNext() {
    if (!peekingIterator.hasNext()) {
      return false;
    }
    DirectionalRecord record = peekingIterator.peek();
    if (record.noResponseRecord) {
      // TODO: log as this is unsupported
      peekingIterator.next();
    }
    return true;
  }
991097
boolean updateIndexEntry(S userStorable, S oldUserStorable) throws PersistException {
        Storable newIndexEntry = makeIndexEntry(userStorable);

        if (oldUserStorable != null) deleteOldEntry: {
            Storable oldIndexEntry;
            try {
                oldIndexEntry = makeIndexEntry(oldUserStorable);
            } catch (PersistException e) {
                Throwable cause = e.getCause();
                if (cause instanceof IllegalArgumentException) {
                    // Can be caused by a corrupt master record, which is
                    // attempting do assign an illegal value to the index. There's
                    // no way to find the old index entry to delete.
                    break deleteOldEntry;
                }
                throw e;
            }

            if (oldIndexEntry.equalPrimaryKeys(newIndexEntry)) {
                // Index entry didn't change, so nothing to do. If the index
                // entry has a version, it will lag behind the master's version
                // until the index entry changes, at which point the version
                // will again match the master.
                return true;
            }

            oldIndexEntry.tryDelete();
        }

        return insertIndexEntry(userStorable, newIndexEntry);
    }
1112606
public final void copyAllFields(Record record, FieldList fieldList)
    {
        for (int i = 0; i < fieldList.getFieldCount(); i++)
        {
            FieldInfo fieldInfo = fieldList.getField(i);
            BaseField field = record.getField(i);
            this.moveFieldToThin(fieldInfo, field, record);
        }
    }
379559
public void copyKeys(Record recAlt, Record recMain, int iKeyArea)
    {
        BaseBuffer vector = new VectorBuffer(null);
        KeyArea keyMain = recMain.getKeyArea(iKeyArea);
        KeyArea keyAlt = recAlt.getKeyArea(iKeyArea);
        keyMain.setupKeyBuffer(vector, DBConstants.FILE_KEY_AREA);
        keyAlt.reverseKeyBuffer(vector, DBConstants.FILE_KEY_AREA);     // Move these keys back to the record
        vector.free();
    }
1363315
public boolean
removeRecord(Record r, int section) {
	if (sections[section] != null && sections[section].remove(r)) {
		header.decCount(section);
		return true;
	}
	else
		return false;
}