code: public boolean stopRegistry() {
          if(logger.isInfoEnabled()) {
              logger.info("Stopping node registry...");
          }
          for(Entry<String, InvocationContext> ctxEntry : balancerRunner.contexts.entrySet())
          {
          	for(Entry<KeySip, Node> entry : ctxEntry.getValue().sipNodeMap(true).entrySet())
          	{
          		if(entry.getValue().getProperties().get(Protocol.HEARTBEAT_PORT)!=null)
          			heartbeatService.sendPacket(entry.getValue().getIp(),Integer.parseInt(entry.getValue().getProperties().get(Protocol.HEARTBEAT_PORT)));
          	}
           	for(Entry<KeySip, Node> entry : ctxEntry.getValue().sipNodeMap(false).entrySet())
           	{
           		if(entry.getValue().getProperties().get(Protocol.HEARTBEAT_PORT)!=null)
           			heartbeatService.sendPacket(entry.getValue().getIp(),Integer.parseInt(entry.getValue().getProperties().get(Protocol.HEARTBEAT_PORT)));
           	}
          }
          heartbeatService.stopServer();
          boolean isDeregistered = true;
          boolean taskCancelled = nodeExpirationTask.cancel();
          if(logger.isInfoEnabled()) {
              logger.info("Node Expiration Task cancelled " + taskCancelled);
          }
          
          if(balancerRunner.balancerContext.allNodesEver!=null)
          	balancerRunner.balancerContext.allNodesEver.clear();
          if(logger.isInfoEnabled()) {
              logger.info("Node registry stopped.");
          }
          return isDeregistered;
      }
docs: {@inheritDoc}