示例#1
0
 public void startLocalNode() {
   boolean nodeCreated = false;
   synchronized (localNodeLock) {
     int i = 0;
     do {
       try {
         i++;
         localNode = ErlRuntime.createOtpNode(data.getCookie(), data.hasLongName());
         localNode.registerStatusHandler(statusWatcher);
         nodeCreated = true;
       } catch (final IOException e) {
         ErlLogger.error("ErlRuntime could not be created (%s), retrying %d", e.getMessage(), i);
         try {
           localNodeLock.wait(300);
         } catch (final InterruptedException e1) {
         }
       }
     } while (!nodeCreated && i < 10);
   }
 }
示例#2
0
 public static String createJavaNodeName() {
   final String fUniqueId = ErlRuntime.getTimeSuffix();
   return "jerlide_" + fUniqueId;
 }