RDBDocumentStore implements DocumentStore { @NotNull @Override public Map<String, String> getStats() { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); tableMeta.forEach((k, v) -> toMapBuilder(builder, k, v)); if (LOG.isDebugEnabled()) { LOG.debug("statistics obtained: " + builder.toString()); } return builder.build(); } RDBDocumentStore(DataSource ds, DocumentNodeStoreBuilder<?> builder, RDBOptions options);  RDBDocumentStore(DataSource ds, DocumentNodeStoreBuilder<?> builder); @Override T find(Collection<T> collection, String id); @Override T find(final Collection<T> collection, final String id, int maxCacheAge); @NotNull @Override List<T> query(Collection<T> collection, String fromKey, String toKey, int limit); @NotNull @Override List<T> query(Collection<T> collection, String fromKey, String toKey, String indexedProperty,
            long startValue, int limit); @Override void remove(Collection<T> collection, String id); @Override void remove(Collection<T> collection, List<String> ids); @Override int remove(Collection<T> collection, Map<String, Long> toRemove); @Override int remove(Collection<T> collection, String indexedProperty, long startValue, long endValue); @Override boolean create(Collection<T> collection, List<UpdateOp> updateOps); @Override T createOrUpdate(Collection<T> collection, UpdateOp update); @Override List<T> createOrUpdate(Collection<T> collection, List<UpdateOp> updateOps); @Override T findAndUpdate(Collection<T> collection, UpdateOp update); @Override CacheInvalidationStats invalidateCache(); @Override CacheInvalidationStats invalidateCache(Iterable<String> keys); @Override void invalidateCache(Collection<T> collection, String id); @Override long determineServerTimeDifferenceMillis(); String getDroppedTables(); static List<String> getTableNames(); @Override void dispose(); @Override T getIfCached(Collection<T> collection, String id); @Override Iterable<CacheStats> getCacheStats(); @Override Map<String, String> getMetadata(); @NotNull @Override Map<String, String> getStats(); boolean isReadOnly(); static byte[] asBytes(@NotNull String data); @Override void setReadWriteMode(String readWriteMode); void setStatsCollector(DocumentStoreStatsCollector stats); static final String COLLISIONSMODCOUNT; static final int CHAR2OCTETRATIO; static String VERSIONPROP; }
@Test public void testRDBStats() { if (ds instanceof RDBDocumentStore) { Map<String, String> info = ds.getStats(); assertThat(info.keySet(), hasItem("nodes.ns")); assertThat(info.keySet(), hasItem("clusterNodes.ns")); assertThat(info.keySet(), hasItem("journal.ns")); assertThat(info.keySet(), hasItem("settings.ns")); assertThat(info.keySet(), hasItem("nodes.count")); assertThat(info.keySet(), hasItem("clusterNodes.count")); assertThat(info.keySet(), hasItem("journal.count")); assertThat(info.keySet(), hasItem("settings.count")); } }