Apply an operation to all objects in the cache.
@param op
@param def
506905
private void applyOp(SchemaOperation op, ZooClassDef def) {
		ops.add(op);
		for (GenericObject o: cache.getAllGenericObjects()) {
			if (o.jdoZooGetClassDef() == def) {
				o.evolve(op);
			}
		}
	}
262967
public <T> void op(UnaryOp op, Local<T> target, Local<T> source) {
        addInstruction(new PlainInsn(op.rop(source.type), sourcePosition,
                target.spec(), source.spec()));
    }
985053
@Override
    public Operation zCombinedAnd(Operation op)
    {
        if (op instanceof IsNullOperation)
        {
            return zCombineWithNullOperation((IsNullOperation) op);
        }
        return op.zCombinedAnd(this);
    }
316789
protected <V> V execute (Operation<V> op)
        throws PersistenceException
    {
        return execute(op, true, true);
    }
152375
@SuppressWarnings("unchecked")
  public <T extends CoreExecution> void performOperation(CoreAtomicOperation<T> operation) {
    LOG.debugPerformingAtomicOperation(operation, this);
    operation.execute((T) this);
  }
780076
function _applyOperation(operation) {
        var i,
            j,
            len,
            op,
            id,
            name,
            elem,
            obj,
            reader,
            val;
        var createdElems = [],
            deletedElems = [],
            updatedElems = [];
        // 1) 요소들의 생성 및 인덱스 등록
        for (i = 0, len = operation.ops.length; i < len; i++) {
            op = operation.ops[i];
            switch (op.op) {
            case OperationBuilder.OP_INSERT:
                reader = new Core.Reader({ data: op.arg }, _global.type);
                elem = reader.readObj("data");
                op._elem = elem;
                op._idMap = reader.idMap;
                // 인덱스에 등록하기
                for (id in reader.idMap) {
                    if (reader.idMap.hasOwnProperty(id)) {
                        obj = reader.idMap[id];
                        _idMap[obj._id] = obj;
                    }
                }
                break;
            case OperationBuilder.OP_REMOVE:
                reader = new Core.Reader({ data: op.arg }, _global.type);
                elem = reader.readObj("data");
                op._elem = elem;
                op._idMap = reader.idMap;
                // 레퍼런스 인덱스에서 제거하기
                for (id in op._idMap) {
                    if (op._idMap.hasOwnProperty(id)) {
                        if (!_.isUndefined(_idMap[id])) {
                            _removeRefsOf(_idMap[id]);
                        }
                    }
                }
                break;
            }
        }
        // 2) 요소들의 필드값 적용
        for (i = 0, len = operation.ops.length; i < len; i++) {
            op = operation.ops[i];
            switch (op.op) {
            case OperationBuilder.OP_INSERT:
                elem = op._elem;
                // 레퍼런스 값들을 복원하기.
                for (id in op._idMap) {
                    if (op._idMap.hasOwnProperty(id)) {
                        obj = op._idMap[id];
                        for (name in obj) {
                            if (obj.hasOwnProperty(name)) {
                                val = obj[name];
                                // if val is a reference
                                if (val && val.$ref) {
                                    obj[name] = _idMap[val.$ref];
                                // if val is an array reference
                                } else if (_.isArray(val)) {
                                    for (j = 0; j < val.length; j++) {
                                        if (val[j] && val[j].$ref) {
                                            val[j] = _idMap[val[j].$ref];
                                        }
                                    }
                                }
                            }
                        }
                        // obj의 참조들을 레퍼런스 인덱스에 추가하기
                        _addRefsOf(obj);
                    }
                }
                createdElems.push(elem);
                break;
            case OperationBuilder.OP_REMOVE:
                elem = op._elem;
                // 인덱스에서 제거하기
                for (id in op._idMap) {
                    if (op._idMap.hasOwnProperty(id)) {
                        delete _idMap[id];
                        delete _refMap[id];
                    }
                }
                deletedElems.push(elem);
                break;
            case OperationBuilder.OP_FIELD_ASSIGN:
                elem = _idMap[op.arg._id];
                if (elem[op.arg.f] && elem[op.arg.f].__read) {
                    elem[op.arg.f].__read(op.arg.n);
                } else {
                    if (op.arg.n && op.arg.n._id) {
                        elem[op.arg.f] = _idMap[op.arg.n._id];
                    } else {
                        elem[op.arg.f] = op.arg.n;
                    }
                    // oldVal를 레퍼런스 인덱스에서 제거
                    if (op.arg.o && op.arg.o._id) {
                        _removeRef(elem, op.arg.o);
                    }
                    // newVal를 레퍼런스 인덱스에 추가
                    if (op.arg.n && op.arg.n._id) {
                        _addRef(elem, op.arg.n);
                    }
                }
                updatedElems.push(elem);
                break;
            case OperationBuilder.OP_FIELD_INSERT:
                elem = _idMap[op.arg._id];
                val = _idMap[op.arg.e];
                if (elem && val) {
                    elem[op.arg.f].insert(op.arg.i, val);
                    // val을 레퍼런스 인덱스에 추가
                    if (val._id) {
                        _addRef(elem, val);
                    }
                }
                updatedElems.push(elem);
                break;
            case OperationBuilder.OP_FIELD_REMOVE:
                elem = _idMap[op.arg._id];
                val = _idMap[op.arg.e];
                if (elem && val) {
                    // 레퍼런스 인덱스에서 제거
                    if (val._id) {
                        _removeRef(elem, val);
                    }
                    elem[op.arg.f].remove(val);
                }
                updatedElems.push(elem);
                break;
            case OperationBuilder.OP_FIELD_REORDER:
                elem = _idMap[op.arg._id];
                val = _idMap[op.arg.e];
                // Store old index of val in the array field of element.
                op.arg.oi = _.indexOf(elem[op.arg.f], val);
                if (elem && val) {
                    elem[op.arg.f].remove(val);
                    elem[op.arg.f].insert(op.arg.i, val);
                }
                // updatedElems.push(elem);
                try {
                    $(exports).triggerHandler('reordered', [val]);
                } catch (err) {
                    console.error(err);
                }
                break;
            case OperationBuilder.OP_FIELD_RELOCATE:
                elem = _idMap[op.arg._id];
                var oldParent  = _idMap[op.arg.op];
                var newParent  = _idMap[op.arg.np];
                if (elem && oldParent && newParent) {
                    oldParent[op.arg.f].remove(elem);
                    newParent[op.arg.f].push(elem);
                    elem._parent = newParent;
                    _removeRef(oldParent, elem);
                    _addRef(newParent, elem);
                }
                try {
                    $(exports).triggerHandler('relocated', [elem, op.arg.f, oldParent, newParent]);
                } catch (err) {
                    console.error(err);
                }
                break;
            }
        }
        // Bypass Operation가 아니면 이벤트를 발생한다.
        if (operation.bypass !== true) {
            if (createdElems.length > 0) {
                try {
                    $(exports).triggerHandler('created', [createdElems]);
                } catch (err) {
                    console.error(err);
                }
            }
            if (deletedElems.length > 0) {
                try {
                    $(exports).triggerHandler('deleted', [deletedElems]);
                } catch (err) {
                    console.error(err);
                }
            }
            if (updatedElems.length > 0) {
                try {
                    $(exports).triggerHandler('updated', [updatedElems]);
                } catch (err) {
                    console.error(err);
                }
            }
            setModified(true);
        }
    }
1313765
void appendOp(int length, int op)
  {

    int totalLen = m_ops.getOp(OpMap.MAPINDEX_LENGTH);

    m_ops.setOp(totalLen, op);
    m_ops.setOp(totalLen + OpMap.MAPINDEX_LENGTH, length);
    m_ops.setOp(OpMap.MAPINDEX_LENGTH, totalLen + length);
  }
801865
private void applyExecute(ExecuteOperation operation) {
    Session session = context.getOrCreateSession(operation.session(), operation.node());
    if (operation.operation() != null) {
      try {
        context.service().apply(new DefaultCommit<>(
            context.setIndex(operation.index()),
            operation.operation().id(),
            operation.operation().value(),
            context.setSession(session),
            context.setTimestamp(operation.timestamp())));
      } catch (Exception e) {
        log.warn("Failed to apply operation: {}", e);
      } finally {
        context.setSession(null);
      }
    }
  }
317398
public void retryOperation(Operation op) {
    if (retryQueueSize >= 0 && retryOps.size() >= retryQueueSize) {
      if (!op.isCancelled()) {
        op.cancel();
      }
    }
    retryOps.add(op);
  }
1244102
public void cache(Identity oid, Object obj)
    {
        doInternalCache(oid, obj, ObjectCacheInternal.TYPE_UNKNOWN);
    }
108538
function applyOperations(operations) {
  for(var i = 0; i < operations.length; i++) {
    var {_1: path, _2: action} = operations[i];
    if(action["$d_ctor"] == "Write") {
      fs.writeFileSync(path, action.args._2, "utf8");
    } else if(action["$d_ctor"] == "Create") {
      // TODO: Create the path if necessary
      fs.writeFileSync(path, action.args._1, "utf8");
    } else if(action["$d_ctor"] == "Rename") {
      if(path.startsWith("/")) path = path.substring(1);
      var newName = action.args._1;
      if(newName.startsWith("/")) newName = newName.substring(1);
      fs.renameSync(path, newName);
    } else if(action["$d_ctor"] == "Delete") {
      fs.unlinkSync(path);
    } else {
      console.log("unrecognized action:", action);
    }
  }
}
452069
public ApiDescriptionBuilder operations(List<Operation> operations) {
    if (operations != null) {
      this.operations = operations.stream().sorted(operationOrdering).collect(toList());
    }
    return this;
  }
1282551
@SafeVarargs
    private final <O extends OperatorHelper> void initOperators(Map<Name, List<O>> opsMap, O... ops) {
        for (O o : ops) {
            Name opName = o.name;
            List<O> helpers = opsMap.getOrDefault(opName, List.nil());
            opsMap.put(opName, helpers.prepend(o));
        }
    }
1046535
public void cache(Identity oid, Object obj)
    {
        if (oid != null && obj != null)
        {
            ObjectCache cache = getCache(oid, obj, METHOD_CACHE);
            if (cache != null)
            {
                cache.cache(oid, obj);
            }
        }
    }
80584
function applyOps(data, ops, className) {
  debugPrint('OPS', ops);
  _.forIn(ops, (value, key) => {
    const operator = value.__op;

    if (operator in UPDATE_OPERATORS) {
      UPDATE_OPERATORS[operator](data, key, value, className);
    } else {
      throw new Error(`Unknown update operator: ${key}`);
    }

    if (MASKED_UPDATE_OPS.has(operator)) {
      getMask(className).add(key);
    }
  });
}
745525
private synchronized void initCopy(CopyOperationImpl op) throws SQLException, IOException {
    pgStream.receiveInteger4(); // length not used
    int rowFormat = pgStream.receiveChar();
    int numFields = pgStream.receiveInteger2();
    int[] fieldFormats = new int[numFields];

    for (int i = 0; i < numFields; i++) {
      fieldFormats[i] = pgStream.receiveInteger2();
    }

    lock(op);
    op.init(this, rowFormat, fieldFormats);
  }
356280
public synchronized void insert_op(int op)
	{

//
// Insert elt in the box
//

		box[insert_elt].req_type = Req_Operation;
		box[insert_elt].attr_type = Attr_Unknown;
		box[insert_elt].op_type = op;
		box[insert_elt].when = new Date();

//
// get client address
//

		get_client_host();
			
//
// manage insert and read indexes
//

		inc_indexes();
		
	}