public static OutMessage remove( final DBCollection collection, final DBEncoder encoder, final DBObject query) { OutMessage om = new OutMessage(collection, OpCode.OP_DELETE, encoder, query); om.writeRemove(); return om; }
public static OutMessage insert( final DBCollection collection, final DBEncoder encoder, WriteConcern concern) { OutMessage om = new OutMessage(collection, OpCode.OP_INSERT, encoder); om.writeInsertPrologue(concern); return om; }
public static OutMessage update( final DBCollection collection, final DBEncoder encoder, final boolean upsert, final boolean multi, final DBObject query, final DBObject o) { OutMessage om = new OutMessage(collection, OpCode.OP_UPDATE, encoder, query); om.writeUpdate(upsert, multi, query, o); return om; }
static OutMessage query( DBCollection collection, int options, int numToSkip, int batchSize, DBObject query, DBObject fields, ReadPreference readPref, DBEncoder enc) { OutMessage om = new OutMessage(collection, enc, query, options, readPref); om.writeQuery(fields, numToSkip, batchSize); return om; }
static OutMessage killCursors(Mongo mongo, int numCursors) { OutMessage om = new OutMessage(mongo, OpCode.OP_KILL_CURSORS); om.writeKillCursorsPrologue(numCursors); return om; }
static OutMessage getMore(DBCollection collection, long cursorId, int batchSize) { OutMessage om = new OutMessage(collection, OpCode.OP_GETMORE); om.writeGetMore(cursorId, batchSize); return om; }