コード例 #1
0
  private void reset(int op) {
    done();
    _buffer.reset();
    set(_buffer);

    _id = ID.getAndIncrement();

    writeInt(0); // length: will set this later
    writeInt(_id);
    writeInt(0); // response to
    writeInt(op);
  }
コード例 #2
0
  void append(String db, WriteConcern c) {

    _id = ID.getAndIncrement();

    int loc = size();

    writeInt(0); // will set this later
    writeInt(_id);
    writeInt(0); // response to
    writeInt(2004);
    _appendQuery(0, db + ".$cmd", 0, -1, c.getCommand(), null);
    _buf.writeInt(loc, size() - loc);
  }