@Override public EndpointDetachResponse detachEndpoint(EndpointProfileDto profile, EndpointDetachRequest endpointDetachRequest) { EndpointDetachResponse response = new EndpointDetachResponse(); response.setRequestId(endpointDetachRequest.getRequestId()); response.setResult(SyncStatus.FAILURE); if (Arrays.equals(profile.getEndpointKeyHash(), endpointKeyHash)) { endpointService.detachEndpointFromUser(profile); response.setResult(SyncStatus.SUCCESS); } else { EndpointProfileDto detachEndpoint = endpointService.findEndpointProfileByKeyHash( && detachEndpoint.getEndpointUserId().equals(profile.getEndpointUserId())) { endpointService.detachEndpointFromUser(detachEndpoint); response.setResult(SyncStatus.SUCCESS); } else { LOG.warn("[{}] received detach endpoint request, "
.getEndpointDetachResponses(); for (EndpointDetachResponse detachResponse : endpointDetachResponses) { if (detachRequest.getRequestId() == detachResponse.getRequestId()) { if (detachResponse.getResult() != SyncStatus.SUCCESS) { LOG.debug("[{}][{}] Skipped unsuccessful detach response [{}]", endpointKey, actorKey, detachResponse.getRequestId()); continue;
: source.getEndpointDetachResponses()) { responses.add(new EndpointDetachResponse( response.getRequestId(), convert(response.getResult())));
buf.putShort((short) userSync.getEndpointDetachResponses().size()); for (EndpointDetachResponse response : userSync.getEndpointDetachResponses()) { buf.put(response.getResult() == SyncStatus.SUCCESS ? SUCCESS : FAILURE); buf.put(NOTHING); buf.putShort((short) response.getRequestId());