38.7.5.4. command
データベースで本体をコマンドとして実行します。ホスト情報、レプリケーション、またはシャーディングステータスを取得するなどの管理操作に役立ちます。
コレクションパラメーターは、この操作では使用されません。
// route: from("command").to("mongodb:myDb?database=science&operation=command");
DBObject commandBody = new BasicDBObject("hostInfo", "1");
Object result = template.requestBody("direct:command", commandBody);
// route: from("command").to("mongodb:myDb?database=science&operation=command");
DBObject commandBody = new BasicDBObject("hostInfo", "1");
Object result = template.requestBody("direct:command", commandBody);