35.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);