def shutdown
      begin
        @is_ok = false
        @server.shutdown
        if not @thread.join(0.1)
          Thread::kill(@thread)
        end
      rescue
        puts 'fail while shutdown'
        Thread::kill(@thread)
      end

      begin
        @publishers.each do |publisher|
          @master.unregister_publisher(publisher.topic_name)
          publisher.close
        end
      rescue
      ensure
        @publishers = []
      end

      begin
        @subscribers.each do |subscriber|
          @master.unregister_subscriber(subscriber.topic_name)
          subscriber.close
        end
      rescue
      ensure
        @subscribers = []
      end
      begin
        @service_servers.each do |service|
          @master.unregister_service(service.service_name,
                                     service.service_uri)
          service.close
        end
      rescue
      ensure
        @service_servers = []
      end
      begin
        @parameter_subscribers.each do |subscriber|
          @master.unsubscribe_param(subscriber.key)
        end
      rescue
      ensure
        @parameter_subscribers = []
      end
      @@all_nodes.delete(self)

      self
    end
def shutdown
      begin
        @is_ok = false
        @server.shutdown
        if not @thread.join(0.1)
          Thread::kill(@thread)
        end
      rescue
        puts 'fail while shutdown'
        Thread::kill(@thread)
      end

      begin
        @publishers.each do |publisher|
          @master.unregister_publisher(publisher.topic_name)
          publisher.close
        end
      rescue
      ensure
        @publishers = []
      end

      begin
        @subscribers.each do |subscriber|
          @master.unregister_subscriber(subscriber.topic_name)
          subscriber.close
        end
      rescue
      ensure
        @subscribers = []
      end
      begin
        @service_servers.each do |service|
          @master.unregister_service(service.service_name,
                                     service.service_uri)
          service.close
        end
      rescue
      ensure
        @service_servers = []
      end
      begin
        @parameter_subscribers.each do |subscriber|
          @master.unsubscribe_param(subscriber.key)
        end
      rescue
      ensure
        @parameter_subscribers = []
      end
      @@all_nodes.delete(self)

      self
    end
shutdown this slave node.
 shutdown the xmlrpc server and all pub/sub connections.
 and delelte all pub/sub instance from connection list
 @return [GraphManager] self