@ DELETE @ Path ( "{id}" ) @ Produces ( APPLICATION_JSON ) @ Timed @ ExceptionMetered public HostDeregisterResponse delete ( @ PathParam ( "id" ) final String host ) { try { model . deregisterHost ( host ) ; return new HostDeregisterResponse ( HostDeregisterResponse . Status . OK , host ) ; } catch ( HostNotFoundException e ) { throw notFound ( new HostDeregisterResponse ( HostDeregisterResponse . Status . NOT_FOUND , host ) ) ; } catch ( HostStillInUseException e ) { throw badRequest ( new HostDeregisterResponse ( HostDeregisterResponse . Status . JOBS_STILL_DEPLOYED , host ) ) ; } }
Deregisters the host from the cluster . Will delete just about everything the cluster knows about it .