@Test public void testDetails() { String details = status.getServerDetails(); assertNotNull(details); assertFalse(details.isEmpty()); assertTrue(details.startsWith("{")); assertTrue(details.endsWith("}")); assertTrue(details.contains("host=")); }
@NotNull public String getServerDetails() { Map<String, Object> details = Maps.newHashMap(); for (String key : SERVER_DETAIL_FIELD_NAMES) { Object value = getServerStatus().get(key); if (value != null) { details.put(key, value); } } return details.toString(); }
MongoStatus implements ServerMonitorListener { @NotNull public String getServerDetails() { Map<String, Object> details = Maps.newHashMap(); for (String key : SERVER_DETAIL_FIELD_NAMES) { Object value = getServerStatus().get(key); if (value != null) { details.put(key, value); } } return details.toString(); } }
MongoStatus implements ServerMonitorListener { @NotNull public String getServerDetails() { Map<String, Object> details = Maps.newHashMap(); for (String key : SERVER_DETAIL_FIELD_NAMES) { Object value = getServerStatus().get(key); if (value != null) { details.put(key, value); } } return details.toString(); } MongoStatus(@NotNull MongoClient client,
                       @NotNull String dbName); }
MongoStatus implements ServerMonitorListener { @NotNull public String getServerDetails() { Map<String, Object> details = Maps.newHashMap(); for (String key : SERVER_DETAIL_FIELD_NAMES) { Object value = getServerStatus().get(key); if (value != null) { details.put(key, value); } } return details.toString(); } MongoStatus(@NotNull MongoClient client,
                       @NotNull String dbName); void checkVersion(); boolean isMajorityReadConcernSupported(); boolean isMajorityReadConcernEnabled(); @NotNull String getServerDetails(); @NotNull String getVersion(); @Override void serverHearbeatStarted(ServerHeartbeatStartedEvent event); @Override void serverHeartbeatSucceeded(ServerHeartbeatSucceededEvent event); @Override void serverHeartbeatFailed(ServerHeartbeatFailedEvent event); }
MongoStatus implements ServerMonitorListener { @NotNull public String getServerDetails() { Map<String, Object> details = Maps.newHashMap(); for (String key : SERVER_DETAIL_FIELD_NAMES) { Object value = getServerStatus().get(key); if (value != null) { details.put(key, value); } } return details.toString(); } MongoStatus(@NotNull MongoClient client,
                       @NotNull String dbName); void checkVersion(); boolean isMajorityReadConcernSupported(); boolean isMajorityReadConcernEnabled(); @NotNull String getServerDetails(); @NotNull String getVersion(); @Override void serverHearbeatStarted(ServerHeartbeatStartedEvent event); @Override void serverHeartbeatSucceeded(ServerHeartbeatSucceededEvent event); @Override void serverHeartbeatFailed(ServerHeartbeatFailedEvent event);  }