@Override protected RpcException mapException(Exception e) { return RpcException.mapException(e); }
@Override protected RpcException mapException(Exception e) { return RpcException.mapException(e); }
@Override protected RpcException mapException(Exception ex) { return RpcException.mapException(ex); }
@Override public void connectionFailed(FailureType type, Throwable t) { settableFuture.setException( ConnectionFailedException.mapException(RpcException.mapException( String.format("Command failed while establishing connection. Failure type %s.", type), t), type)); }
@Override public void setException(Throwable t) { handler.failed(RpcException.mapException(t)); }
@Override public void connectionFailed(FailureType type, Throwable t) { listener.failed( ConnectionFailedException.mapException(RpcException.mapException( String.format("Command failed while establishing connection. Failure type %s.", type), t), type)); }
public List<QueryDataBatch> getResults() throws RpcException{ try { return future.get(); } catch (Throwable t) { /* * Since we're not going to return the result to the caller * to clean up, we have to do it. */ for(final QueryDataBatch queryDataBatch : results) { queryDataBatch.release(); } throw RpcException.mapException(t); } }
void channelClosed(Throwable ex) { isOpen.set(false); if (ex != null) { final IntObjectHashMap<RpcOutcome<?>> clonedMap; synchronized (map) { clonedMap = map.clone(); map.clear(); } final RpcException e = RpcException.mapException(ex); clonedMap.forEach(new SetExceptionProcedure(e)); } }
public void getResults() throws RpcException { try { future.get(); } catch(Throwable t) { throw RpcException.mapException(t); } }
@Override public void execDataArrived(RpcOutcomeListener<GeneralRPCProtos.Ack> outcomeListener, QueryWritableBatch result) { try { // any failures here should notify the listener and release the batches result = attemptHandler.convertIfNecessary(result); } catch (Exception ex) { outcomeListener.failed(RpcException.mapException(ex)); for (ByteBuf byteBuf : result.getBuffers()) { byteBuf.release(); } return; } super.execDataArrived(outcomeListener, result); }