218.5.5.3. getColStats
MongoDB シェルで db.collection.stats() コマンドを実行することと同等です。これにより、コレクションに関する有用な統計図が表示されます。
以下に例を示します。
使用例:
// from("direct:getColStats").to("mongodb3:myDb?database=flights&collection=tickets&operation=getColStats");
Object result = template.requestBody("direct:getColStats", "irrelevantBody");
assertTrue("Result is not of type Document", result instanceof Document);
// from("direct:getColStats").to("mongodb3:myDb?database=flights&collection=tickets&operation=getColStats");
Object result = template.requestBody("direct:getColStats", "irrelevantBody");
assertTrue("Result is not of type Document", result instanceof Document);
操作は、OUT メッセージボディーの Document の形式で、シェルに表示されるデータ構造を返します。