Пример #1
1
 static {
   updaterIntervalMS =
       Integer.parseInt(System.getProperty("com.mongodb.updaterIntervalMS", "5000"));
   slaveAcceptableLatencyMS =
       Integer.parseInt(System.getProperty("com.mongodb.slaveAcceptableLatencyMS", "15"));
   inetAddrCacheMS = Integer.parseInt(System.getProperty("com.mongodb.inetAddrCacheMS", "300000"));
   _mongoOptions.connectTimeout =
       Integer.parseInt(System.getProperty("com.mongodb.updaterConnectTimeoutMS", "20000"));
   _mongoOptions.socketTimeout =
       Integer.parseInt(System.getProperty("com.mongodb.updaterSocketTimeoutMS", "20000"));
 }
 static {
   updaterIntervalMS =
       Integer.parseInt(System.getProperty("com.mongodb.updaterIntervalMS", "5000"));
   updaterIntervalNoMasterMS =
       Integer.parseInt(System.getProperty("com.mongodb.updaterIntervalNoMasterMS", "10"));
   slaveAcceptableLatencyMS =
       Integer.parseInt(System.getProperty("com.mongodb.slaveAcceptableLatencyMS", "15"));
   inetAddrCacheMS = Integer.parseInt(System.getProperty("com.mongodb.inetAddrCacheMS", "300000"));
   latencySmoothFactor =
       Float.parseFloat(System.getProperty("com.mongodb.latencySmoothFactor", "4"));
   _mongoOptionsDefaults.connectTimeout =
       Integer.parseInt(System.getProperty("com.mongodb.updaterConnectTimeoutMS", "20000"));
   _mongoOptionsDefaults.socketTimeout =
       Integer.parseInt(System.getProperty("com.mongodb.updaterSocketTimeoutMS", "20000"));
 }