Reposition the key/value buffers based on the passed operation.

@param op options for this operation
@return false if requested position not found
359803
public boolean seek(final SeekOp op) {
    if (SHOULD_CHECK) {
      requireNonNull(op);
      checkNotClosed();
      txn.checkReady();
    }

    final int rc = LIB.mdb_cursor_get(ptrCursor, kv.pointerKey(), kv
                                      .pointerVal(), op.getCode());

    if (rc == MDB_NOTFOUND) {
      return false;
    }

    checkRc(rc);
    kv.keyOut();
    kv.valOut();
    return true;
  }
644338
public void execute(FeatureOperation op) {
		if (newFeatures != null && newFeatures.length > 0) {
			operationQueue.add(op);
			for (Feature newFeature : newFeatures) {
				op.execute(newFeature);
			}
		}
	}
629673
function( cb ){
              if( ! self.positionField ){
                cb( null );
              } else {

                // If repositioning is required, do it
                if( self.positionField ){
                  var where, beforeId;
                  if( ! options.position ){
                    where = 'end';
                  } else {
                    where = options.position.where;
                    beforeId = options.position.beforeId;
                  }
                  self.reposition( recordWithLookups, where, beforeId, cb );
                }
              }
            }
727524
public static ModelNode getOperationAddress(final ModelNode op) {
        return op.hasDefined(OP_ADDR) ? op.get(OP_ADDR) : new ModelNode();
    }
1367289
public void evolve(SchemaOperation op) {
		//TODO this is horrible!!!
		ArrayList<Object> fV = new ArrayList<Object>(Arrays.asList(fixedValues));
		ArrayList<Object> vV = new ArrayList<Object>(Arrays.asList(variableValues));
		
		//TODO resize only once to correct size
		if (op instanceof SchemaOperation.SchemaFieldDefine) {
			SchemaOperation.SchemaFieldDefine op2 = (SchemaFieldDefine) op;
			int fieldId = op2.getField().getFieldPos();
			fV.add(fieldId, PersistentSchemaOperation.getDefaultValue(op2.getField()));
			vV.add(fieldId, null);
		}
		if (op instanceof SchemaOperation.SchemaFieldDelete) {
			SchemaOperation.SchemaFieldDelete op2 = (SchemaFieldDelete) op;
			int fieldId = op2.getField().getFieldPos();
			fV.remove(fieldId);
			vV.remove(fieldId);
		}
		fixedValues = fV.toArray(fixedValues);
		variableValues = vV.toArray(variableValues);
	}
219542
<Q extends BaseProxy> Q processReturnOperation(final SimpleProxyId<Q> id,
      final OperationMessage op, final WriteOperation... operations) {

    final AutoBean<Q> toMutate = this.getProxyForReturnPayloadGraph(id);
    toMutate.setTag(Constants.VERSION_PROPERTY_B64, op.getVersion());

    final Map<String, Splittable> properties = op.getPropertyMap();
    if (properties != null) {
      // Apply updates
      toMutate.accept(new AutoBeanVisitor() {
        @Override
        public boolean visitReferenceProperty(final String propertyName, final AutoBean<?> value,
            final PropertyContext ctx) {
          if (ctx.canSet()) {
            if (properties.containsKey(propertyName)) {
              final Splittable raw = properties.get(propertyName);
              Object decoded = null;
              if (ctx.getType() == Map.class) {
                final MapPropertyContext mapCtx = (MapPropertyContext) ctx;
                final Class<?> keyType = mapCtx.getKeyType();
                final Class<?> valueType = mapCtx.getValueType();
                decoded = EntityCodex.decode(AbstractRequestContext.this, mapCtx.getType(), keyType,
                    valueType, raw);
              } else {
                final Class<?> elementType = ctx instanceof CollectionPropertyContext
                    ? ((CollectionPropertyContext) ctx).getElementType()
                    : null;
                decoded = EntityCodex.decode(AbstractRequestContext.this, ctx.getType(),
                    elementType, raw);
              }
              ctx.set(decoded);
            }
          }
          return false;
        }

        @Override
        public boolean visitValueProperty(final String propertyName, final Object value,
            final PropertyContext ctx) {
          if (ctx.canSet()) {
            if (properties.containsKey(propertyName)) {
              final Splittable raw = properties.get(propertyName);
              Object decoded = ValueCodex.decode(ctx.getType(), raw);
              /*
               * Hack for Date subtypes, consider generalizing for "custom serializers"
               */
              if (decoded != null && Date.class.equals(ctx.getType())) {
                decoded = new DatePoser((Date) decoded);
              }
              ctx.set(decoded);
            }
          }
          return false;
        }
      });
    }

    // Finished applying updates, freeze the bean
    this.makeImmutable(toMutate);
    final Q proxy = toMutate.as();

    /*
     * Notify subscribers if the object differs from when it first came into the RequestContext.
     */
    if (operations != null && this.state.requestFactory.isEntityType(id.getProxyClass())) {
      for (final WriteOperation writeOperation : operations) {
        if (writeOperation.equals(WriteOperation.UPDATE)
            && !this.state.requestFactory.hasVersionChanged(id, op.getVersion())) {
          // No updates if the server reports no change
          continue;
        }
        this.state.requestFactory.getEventBus().fireEventFromSource(
            new EntityProxyChange<>((EntityProxy) proxy, writeOperation), id.getProxyClass());
      }
    }
    return proxy;
  }
647153
public void setPos(Object p) {
        Object[] a = (Object[]) p;
        buf = (char[]) a[0];
        int[] v = (int[]) a[1];
        pos.setIndex(v[0]);
        bufPos = v[1];
    }
573916
boolean moveCursor(final INodeReadTrx paramRtx, final ERevision paramRevision) throws TTIOException {
        assert paramRtx != null;

        boolean moved = false;

        final ITreeStructData node = ((ITreeStructData)paramRtx.getNode());
        if (node.hasFirstChild()) {
            if (node.getKind() != ROOT && mDiffKind == EDiffOptimized.HASHED && mHashKind != HashKind.None
                && (mDiff == EDiff.SAMEHASH || mDiff == EDiff.DELETED)) {
                moved = paramRtx.moveTo(((ITreeStructData)paramRtx.getNode()).getRightSiblingKey());

                if (!moved) {
                    moved = moveToFollowingNode(paramRtx, paramRevision);
                }
            } else {
                moved = paramRtx.moveTo(((ITreeStructData)paramRtx.getNode()).getFirstChildKey());
                if (moved) {
                    switch (paramRevision) {
                    case NEW:
                        mDepth.incrementNewDepth();
                        break;
                    case OLD:
                        mDepth.incrementOldDepth();
                        break;
                    }
                }
            }
        } else if (node.hasRightSibling()) {
            if (paramRtx.getNode().getDataKey() == mRootKey) {
                paramRtx.moveTo(ROOT_NODE);
            } else {
                moved = paramRtx.moveTo(((ITreeStructData)paramRtx.getNode()).getRightSiblingKey());
            }
        } else {
            moved = moveToFollowingNode(paramRtx, paramRevision);
        }

        return moved;
    }
1073914
@Override
    public void handleOps(int ops) {
        if ((ops & SelectionKey.OP_ACCEPT) == 0 || closing) {
            return;
        }
        synchronized (channels) {
            if (connLimiter != null && !connLimiter.tryAcquire()) {
                return;
            }
            try {
                SocketChannel socketChannel = serverSocketChannel.accept();
                if (socketChannel == null) {
                    // "False alarm"
                    if (connLimiter != null) {
                        connLimiter.release();
                    }
                    return;
                }
                channels.add(new TcpChannelImpl(socketChannel));
            } catch (IOException e) {
                fire(new IOError(null, e));
            }
        }
    }
1257728
Object runOp(Op op) {
        LOG.debug("Run: {}", op);
        recursive.set(Boolean.TRUE);
        try {
            if (op.type == Op.Type.PUT || op.type == Op.Type.ALLOC)
                return execOp(op, null);

            final long id = op.line;
            CacheLine line = getLine(id);
            if (line == null) {
                Object res = handleOpNoLine(op.type, op.line, op.getExtra());
                if (res != DIDNT_HANDLE)
                    return res;
                else
                    line = createNewCacheLine(op);
            }

            final Object res;
            synchronized (line) {
                res = execOp(op, line);
            }

            receiveShortCircuit();

            if (res instanceof Op)
                return runOp((Op) res);
            return res;
        } finally {
            recursive.remove();
        }
    }
174918
private static void pushOp(String operation, Stack<MetricExpression> expressions, Stack<String> operations) {
        if (operation.equals("(")) {
            operations.push(operation);
            return;
        }

        if (operation.equals(")")) {
            while (!operations.isEmpty()) {
                String op = operations.pop();
                if (op.equals("("))
                    return;
                doOperation(op, expressions, operations);
            }
        }


        if (operation.equals("*") || operation.equals("/")) {
            if (operations.isEmpty())
                operations.push(operation);
            else {
                String op1 = operations.peek();
                if (!op1.equals("(")) {
                    if (op1.equals("+") || op1.equals("-")) {
                        operations.push(operation);
                    } else {
                        doOperation(operations.pop(), expressions, operations);
                        operations.push(operation);
                    }
                } else {
                    operations.push(operation);
                }

            }
        }
        if (operation.equals("+") || operation.equals("-")) {
            if (operations.isEmpty())
                operations.push(operation);
            else {
                String op1 = operations.peek();
                if (!op1.equals("(")) {
                    doOperation(operations.pop(), expressions, operations);
                }
                operations.push(operation);
            }
        }
    }
1129748
private void addOp(String op, String path, String value) {
        if (this.operations == null) {
            this.operations = new JsonArray();
        }

        this.operations.add(new JsonObject()
                .add("op", op)
                .add("path", path)
                .add("value", value));
    }
880072
public void setOperations(java.util.Collection<BatchWriteOperation> operations) {
        if (operations == null) {
            this.operations = null;
            return;
        }

        this.operations = new java.util.ArrayList<BatchWriteOperation>(operations);
    }
513777
public boolean get(final T key, final GetOp op) {
    if (SHOULD_CHECK) {
      requireNonNull(key);
      requireNonNull(op);
      checkNotClosed();
      txn.checkReady();
    }
    kv.keyIn(key);

    final int rc = LIB.mdb_cursor_get(ptrCursor, kv.pointerKey(), kv
                                      .pointerVal(), op.getCode());

    if (rc == MDB_NOTFOUND) {
      return false;
    }

    checkRc(rc);
    kv.keyOut();
    kv.valOut();
    return true;
  }
41835
public boolean moveTo(final long pKey) {
        try {
            if (pKey < 0 || mRTX.moveTo(pKey)) {
                lastPointer.put(mRTX, pKey);
                return true;
            } else {
                return false;
            }
        } catch (TTIOException exc) {
            throw new RuntimeException(exc);
        }
    }
835484
public PutOperation<K, V> applyOperation(K key, PutOperation<K, V> existing, Operation<K, V> operation) {
    final Result<K, V> newValue = operation.apply(existing);
    if (newValue == null) {
      return null;
    } else {
      return newValue.asOperationExpiringAt(Long.MAX_VALUE);
    }
  }
1217661
public void setOperations(java.util.Collection<BatchReadOperation> operations) {
        if (operations == null) {
            this.operations = null;
            return;
        }

        this.operations = new java.util.ArrayList<BatchReadOperation>(operations);
    }