/** * Override as non-synchronized method because the method is thread safe. */ @Override public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { try { CallFuture<List<ByteBuffer>> transceiverFuture = new CallFuture<>(); transceive(request, transceiverFuture); return transceiverFuture.get(); } catch (InterruptedException e) { LOG.debug("failed to get the response", e); return null; } catch (ExecutionException e) { LOG.debug("failed to get the response", e); return null; } }
/** * Override as non-synchronized method because the method is thread safe. */ @Override public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { try { CallFuture<List<ByteBuffer>> transceiverFuture = new CallFuture<List<ByteBuffer>>(); transceive(request, transceiverFuture); return transceiverFuture.get(); } catch (InterruptedException e) { LOG.debug("failed to get the response", e); return null; } catch (ExecutionException e) { LOG.debug("failed to get the response", e); return null; } }