private void handleFailure(Throwable t) { if (message.doCallbackOnFailure()) { MessageOut response = new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE) .withParameter(MessagingService.FAILURE_RESPONSE_PARAM, MessagingService.ONE_BYTE); if (t instanceof TombstoneOverwhelmingException) { try (DataOutputBuffer out = new DataOutputBuffer()) { out.writeShort(RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code); response = response.withParameter(MessagingService.FAILURE_REASON_PARAM, out.getData()); } catch (IOException ex) { throw new RuntimeException(ex); } } MessagingService.instance().sendReply(response, id, message.from); } }
private void handleFailure(Throwable t) { if (message.doCallbackOnFailure()) { MessageOut response = new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE) .withParameter(MessagingService.FAILURE_RESPONSE_PARAM, MessagingService.ONE_BYTE); if (t instanceof TombstoneOverwhelmingException) { try (DataOutputBuffer out = new DataOutputBuffer()) { out.writeShort(RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code); response = response.withParameter(MessagingService.FAILURE_REASON_PARAM, out.getData()); } catch (IOException ex) { throw new RuntimeException(ex); } } MessagingService.instance().sendReply(response, id, message.from); } }
private void handleFailure(Throwable t) { if (message.doCallbackOnFailure()) { MessageOut response = new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE) .withParameter(MessagingService.FAILURE_RESPONSE_PARAM, MessagingService.ONE_BYTE); if (t instanceof TombstoneOverwhelmingException) { try (DataOutputBuffer out = new DataOutputBuffer()) { out.writeShort(RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code); response = response.withParameter(MessagingService.FAILURE_REASON_PARAM, out.getData()); } catch (IOException ex) { throw new RuntimeException(ex); } } MessagingService.instance().sendReply(response, id, message.from); } }