@ DELETE public Response cancelLease ( @ HeaderParam ( PeerEurekaNode . HEADER_REPLICATION ) String isReplication ) { try { boolean isSuccess = registry . cancel ( app . getName ( ) , id , "true" . equals ( isReplication ) ) ; if ( isSuccess ) { logger . debug ( "Found (Cancel): {} - {}" , app . getName ( ) , id ) ; return Response . ok ( ) . build ( ) ; } else { logger . info ( "Not Found (Cancel): {} - {}" , app . getName ( ) , id ) ; return Response . status ( Status . NOT_FOUND ) . build ( ) ; } } catch ( Throwable e ) { logger . error ( "Error (cancel): {} - {}" , app . getName ( ) , id , e ) ; return Response . serverError ( ) . build ( ) ; } }
Handles cancellation of leases for this particular instance .