Ejemplo n.º 1
0
 public boolean isOK() {
   System.out.println("pigeon version = " + net.xinshi.pigeon.distributed.Constants.version);
   nodesDispatcher.licOK = false;
   try {
     nodesDispatcher.licOK = CheckLicense.check();
   } catch (Exception e) {
     e.printStackTrace();
   }
   if (nodesDispatcher.licOK) {
     new Thread(this).start();
   }
   System.out.println("nodesDispatcher.licOK = " + nodesDispatcher.licOK);
   return nodesDispatcher.licOK;
 }
Ejemplo n.º 2
0
 public void run() {
   Thread.currentThread().setName("CheckWorker_run");
   while (true) {
     try {
       nodesDispatcher.licOK = CheckLicense.check();
     } catch (Exception e) {
       e.printStackTrace();
     }
     try {
       Thread.sleep(1000 * 600);
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
 }