예제 #1
0
 static {
   final String counter = System.getProperty("xbird.counter");
   if ("cliffc".equals(counter)) {
     counterType = CounterType.cliffc;
   } else if ("stripe".equals(counter)) {
     counterType = CounterType.stripe;
   } else if ("stripe2".equals(counter)) {
     counterType = CounterType.stripe2;
   } else if ("stripe3".equals(counter)) {
     counterType = CounterType.stripe3;
   } else if ("atomic".equals(counter)) {
     counterType = CounterType.atomic;
   } else {
     counterType = CounterType.auto;
   }
   int nstripe = Integer.parseInt(Settings.get("xbird.util.counter.nstripe", "-1"));
   if (nstripe == -1) {
     int procs = SystemUtils.availableProcessors();
     nstripe = Math.max(4, procs >> 3); // 4 < x < 8
   }
   NSTRIPE = nstripe;
 }
예제 #2
0
 static {
   BIND_NIC = Settings.getThroughSystemProperty("xbird.net.bind_interface");
 }