Deletes the server.
18379
public void delete() {
    try {
      Files.walkFileTree(partition.dataDirectory().toPath(), new SimpleFileVisitor<Path>() {
        @Override
        public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
          Files.delete(file);
          return FileVisitResult.CONTINUE;
        }

        @Override
        public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
          Files.delete(dir);
          return FileVisitResult.CONTINUE;
        }
      });
    } catch (IOException e) {
      log.error("Failed to delete partition: {}", e);
    }
  }
919830
def terminate(self):
        """"""
        logger.info("deleting entire server %s" % self)
        self.close()
        try:
            shutil.rmtree(self.basedir)
            logger.info("deleted server under %s" % self.basedir)
            # delete everything from self, so that using this object fails results
            # in an error as quickly as possible
            for val in self.__dict__.keys():
                try:
                    delattr(self, val)
                except:
                    pass
        except Exception, e:
            logger.warning("failed to delete SessionServer: %s" % (e))
266666
def destroy_rackspace(connection, region, instance_id):
    

    server = connection.servers.get(instance_id)
    log_yellow('deleting rackspace instance ...')
    server.delete()

    # wait for server to be deleted
    try:
        while True:
            server = connection.servers.get(server.id)
            log_yellow('waiting for deletion ...')
            sleep(5)
    except:
        pass
    log_green('The server has been deleted')
1163087
def delete(*keys, **connection_args):
    '''
    
    '''
    # Get connection args from keywords if set
    conn_args = {}
    for arg in ['host', 'port', 'db', 'password']:
        if arg in connection_args:
            conn_args[arg] = connection_args[arg]

    server = _connect(**conn_args)
    return server.delete(*keys)
1071290
def server_close(self):
        
        if self.remove_file:
            try:
                os.remove(self.remove_file)
            except:
                pass
        self.socket.close()
578867
public function delete()
    {
        parent::delete();

        $this->database->deleteReserved($this->queue, $this->job->id);
    }
1252855
def stop(self):
        '''
        
        '''
        self._server.shutdown()
        self._server.server_close()
        self._thread.join()
        self.running = False
593582
def delete(self):
        
        key = 'https://plex.tv/devices/%s.xml' % self.id
        self._server.query(key, self._server._session.delete)
213201
private function cleanupAppServers()
    {
        $allFoundServers = $this->loadAppServerList();
        /** @var \OxidEsales\Eshop\Core\DataObject\ApplicationServer $server */
        foreach ($allFoundServers as $server) {
            if ($server->needToDelete($this->currentTime)) {
                $this->deleteAppServerById($server->getId());
            }
        }
    }
547007
def delete(self):
        
        j, r = self.datacenter.request('DELETE', self.path)
        r.raise_for_status()
1287694
async def close(self):
        '''
        '''
        if self.server:
            self.server.close()
            await self.server.wait_closed()
            self.server = None
728672
def delete(options = {})
      options = options.merge(server_certificate_name: @name)
      resp = @client.delete_server_certificate(options)
      resp.data
    end
1197709
public CompletableFuture<Void> delete() {
    return server.stop().thenCompose(v -> client.stop()).thenRun(() -> {
      if (server != null) {
        server.delete();
      }
    });
  }
879124
def remove(self, server_id):
        
        server = self._storage.pop(server_id)
        server.stop()
        server.cleanup()
1187195
def destroy_server(server_id):
    ''' 

    '''
    server = curstate().uuid_to_server.get(server_id, None)
    if server is None:
        log.debug("No server instance found for uuid: %r" % server_id)
        return

    try:
        for session in server.get_sessions():
            session.destroy()
        server.stop()
        del curstate().uuid_to_server[server_id]

    except Exception as e:
        log.debug("Could not destroy server for id %r: %s" % (server_id, e))
32022
protected void dispose() {
        // Terminates the server thread
        if(serverThread != null) {
            serverThread.interrupt();
            serverThread = null;
        }

        // Stops each connection and clears them
        synchronized(connections) {
            for(FTPConnection con : connections) {
                try {
                    con.stop(true);
                } catch(Exception ex) {
                    ex.printStackTrace();
                }
            }
            connections.clear();
        }
    }
307269
def close(self):
        
        if self._server is None:
            raise RuntimeError('Server is not started')
        self._server.close()
        for handler in self._handlers:
            handler.close()