<pre>
Use this operation to delete a syslog server.
</pre>
176304
public static syslog_server delete(nitro_service client, syslog_server resource) throws Exception
	{
		resource.validate("delete");
		return ((syslog_server[]) resource.delete_resource(client))[0];
	}
21565
public static void removeShutdownHook(final Thread shutdownHook, final String serviceName, final Logger logger) {

		// Do not run if this is invoked by the shutdown hook itself
		if (shutdownHook == null || shutdownHook == Thread.currentThread()) {
			return;
		}

		checkNotNull(logger);

		try {
			Runtime.getRuntime().removeShutdownHook(shutdownHook);
		} catch (IllegalStateException e) {
			// race, JVM is in shutdown already, we can safely ignore this
			logger.debug("Unable to remove shutdown hook for {}, shutdown already in progress", serviceName, e);
		} catch (Throwable t) {
			logger.warn("Exception while un-registering {}'s shutdown hook.", serviceName, t);
		}
	}
1349896
public void unregisterService() {

		try {
			if( this.serviceReg != null ) {
				this.logger.finer( "Running in an OSGi environment. Trying to unregister a MBean for the messaging." );
				this.serviceReg.unregister();
				this.logger.finer( "Running in an OSGi environment. The MBean was unregistered." );
			}

		} catch( Exception e ) {
			this.logger.severe( "A MBean could not be unregistered for the messaging." );
			Utils.logException( this.logger, e );

		} finally {
			this.serviceReg = null;
		}
	}
1090778
def destroy(self, si, logger, session, vcenter_data_model, vm_uuid, vm_name, reservation_id):
        
        # disconnect
        self._disconnect_all_my_connectors(session=session, resource_name=vm_name, reservation_id=reservation_id,
                                           logger=logger)
        # find vm
        vm = self.pv_service.find_by_uuid(si, vm_uuid)

        if vm is not None:
            # destroy vm
            result = self.pv_service.destroy_vm(vm=vm, logger=logger)
        else:
            logger.info("Could not find the VM {0},will remove the resource.".format(vm_name))
            result = True

        # delete resources
        self.resource_remover.remove_resource(session=session, resource_full_name=vm_name)
        return result
18252
def destroy(self):
        
        logger.info("destroying server")
        if self.library:
            self.library.Srv_Destroy(ctypes.byref(self.pointer))
422167
public OperationFuture<List<Server>> delete(Server... servers) {
        List<JobFuture> futures = Arrays.asList(servers).stream()
            .map(serverRef -> delete(serverRef).jobFuture())
            .collect(toList());

        return new OperationFuture<>(
            Arrays.asList(servers),
            new ParallelJobsFuture(futures)
        );
    }
1336799
public static syslog_snmp delete(nitro_service client, syslog_snmp resource) throws Exception
	{
		resource.validate("delete");
		return ((syslog_snmp[]) resource.delete_resource(client))[0];
	}
1162230
def remove_service(self, zeroconf, srv_type, srv_name):
        """"""
        self.servers.remove_server(srv_name)
        logger.info(
            "Glances server %s removed from the autodetect list" % srv_name)
154223
def server_delete(s_name, **connection_args):
    '''
    
    '''
    ret = True
    server = _server_get(s_name, **connection_args)
    if server is None:
        return False
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    try:
        NSServer.delete(nitro, server)
    except NSNitroError as error:
        log.debug('netscaler module error - NSServer.delete() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret
90552
public static ns_cluster remove(nitro_service client, ns_cluster resource) throws Exception
	{
		return ((ns_cluster[]) resource.perform_operation(client, "remove"))[0];
	}
834137
public synchronized void destroyForPort(int port)
   {
      synchronized(portMap)
      {
         UndertowServerEngine ref = portMap.remove(port);
         if (ref != null)
         {
            if (LOG.isDebugEnabled())
            {
               LOG.debug("Stopping HttpServer Engine on port " + port + ".");
            }
            try
            {
               ref.stop();
            }
            catch (Exception e)
            {
               LOG.warn("", e);
            }
         }
      }
   }
952296
public static base_response delete(nitro_service client, ntpserver resource) throws Exception {
		ntpserver deleteresource = new ntpserver();
		deleteresource.serverip = resource.serverip;
		deleteresource.servername = resource.servername;
		return deleteresource.delete_resource(client);
	}
980627
public void deleteSystemHook(SystemHook hook) throws GitLabApiException {

        if (hook == null) {
            throw new RuntimeException("hook cannot be null");
        }

        deleteSystemHook(hook.getId());
    }
918862
static public void shutdown() {

        // need to unregister the service
        if (getServerConfig().enableRegistry && registry != null && serviceUrls != null) {
            for(URL serviceUrl: serviceUrls) {
                registry.unregister(serviceUrl);
                // Please don't remove the following line. When server is killed, the logback won't work anymore.
                // Even debugger won't reach this point; however, the logic is executed successfully here.
                System.out.println("unregister serviceUrl " + serviceUrl);
                if (logger.isInfoEnabled())
                    logger.info("unregister serviceUrl " + serviceUrl);
            }
        }

        if (gracefulShutdownHandler != null) {
            logger.info("Starting graceful shutdown.");
            gracefulShutdownHandler.shutdown();
            try {
                gracefulShutdownHandler.awaitShutdown(60 * 1000);
            } catch (InterruptedException e) {
                logger.error("Error occurred while waiting for pending requests to complete.", e);
            }
            logger.info("Graceful shutdown complete.");
        }

        ShutdownHookProvider[] shutdownHookProviders = SingletonServiceFactory.getBeans(ShutdownHookProvider.class);
        if (shutdownHookProviders != null)
            Arrays.stream(shutdownHookProviders).forEach(s -> s.onShutdown());

        stop();
        logger.info("Cleaning up before server shutdown");
    }
443006
public synchronized static void destroyInstance(SyslogIF syslog) throws SyslogRuntimeException {
        if (syslog == null) {
            return;
        }

        String protocol = syslog.getProtocol().toLowerCase();

        if (instances.containsKey(protocol)) {
            try {
                syslog.shutdown();

            } finally {
                instances.remove(protocol);
            }

        } else {
            throw new SyslogRuntimeException("Cannot destroy protocol \"%s\" instance; call shutdown instead", protocol);
        }
    }
1250480
public void deleteServerGroup(int id) {
        try {
            sqlService.executeUpdate("DELETE FROM " + Constants.DB_TABLE_SERVER_GROUPS +
                                         " WHERE " + Constants.GENERIC_ID + " = " + id + ";");

            sqlService.executeUpdate("DELETE FROM " + Constants.DB_TABLE_SERVERS +
                                         " WHERE " + Constants.SERVER_REDIRECT_GROUP_ID + " = " + id);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
814872
public void destroy(GSSCredential credential,
                        DestroyParams params)
        throws MyProxyException {

        if (credential == null) {
            throw new IllegalArgumentException("credential == null");
        }

        if (params == null) {
            throw new IllegalArgumentException("params == null");
        }

        String msg = params.makeRequest();

        Socket gsiSocket = null;
        OutputStream out = null;
        InputStream  in  = null;

        try {
            gsiSocket = getSocket(credential);

            out = gsiSocket.getOutputStream();
            in  = gsiSocket.getInputStream();

            if (!((GssSocket)gsiSocket).getContext().getConfState())
                throw new Exception("Confidentiality requested but not available");

            // send message
            out.write(msg.getBytes());
            out.flush();

            if (logger.isDebugEnabled()) {
                logger.debug("Req sent:" + params);
            }

            handleReply(in);

        } catch(Exception e) {
            throw new MyProxyException("MyProxy destroy failed.", e);
        } finally {
            // close socket
            close(out, in, gsiSocket);
        }
    }