Example #1
0
 /**
  * Sends the oracle a subscription request for each node of interest. If the response tells us
  * that node is failed, we mark it as failed. Will subscribe to ourselves, so that on startup we
  * can know if we are technically still failed in the overall system; this is to trigger ourselves
  * as still failed and thus removing ourselves from any primaries.
  */
 public void initialize() {
   for (NodeId nodeOfInterest : NodeRuntime.getAppManager().getNodesOfInterest()) {
     System.out.println("Configurator Subscribing to node " + nodeOfInterest);
     boolean isAlreadyFailed = OracleClient.subscribe(nodeOfInterest);
     if (isAlreadyFailed) {
       System.out.println("Configurator notified of failure of " + nodeOfInterest);
       NodeRuntime.getAppManager().removeFailedNode(nodeOfInterest);
     }
   }
 }