@Override public ClientMessage resolveAndThrowIfException(Object response) throws ExecutionException, InterruptedException { if (response instanceof Throwable) { fixAsyncStackTrace((Throwable) response, Thread.currentThread().getStackTrace()); if (response instanceof ExecutionException) { throw (ExecutionException) response; } if (response instanceof Error) { throw (Error) response; } if (response instanceof InterruptedException) { throw (InterruptedException) response; } if (response instanceof CancellationException) { throw (CancellationException) response; } throw new ExecutionException((Throwable) response); } return (ClientMessage) response; }
@Override public ClientMessage resolveAndThrowIfException(Object response) throws ExecutionException, InterruptedException { if (response instanceof Throwable) { fixAsyncStackTrace((Throwable) response, Thread.currentThread().getStackTrace()); if (response instanceof ExecutionException) { throw (ExecutionException) response; } if (response instanceof Error) { throw (Error) response; } if (response instanceof InterruptedException) { throw (InterruptedException) response; } if (response instanceof CancellationException) { throw (CancellationException) response; } throw new ExecutionException((Throwable) response); } return (ClientMessage) response; }
public void notifyRemoteException(Address remoteAddress, Throwable throwable) { // Cancel all partition states jobProcessInformation.cancelPartitionState(); // Notify all other nodes about cancellation Set<Address> addresses = collectRemoteAddresses(); // Cancel local job TrackableJobFuture future = cancel(); // Now notify all involved members to cancel the job asyncCancelRemoteOperations(addresses); if (future != null) { // Might be already cancelled by another members exception fixAsyncStackTrace(throwable, Thread.currentThread().getStackTrace(), "Operation failed on node: " + remoteAddress); future.setResult(throwable); } }
public void notifyRemoteException(Address remoteAddress, Throwable throwable) { // Cancel all partition states jobProcessInformation.cancelPartitionState(); // Notify all other nodes about cancellation Set<Address> addresses = collectRemoteAddresses(); // Cancel local job TrackableJobFuture future = cancel(); // Now notify all involved members to cancel the job asyncCancelRemoteOperations(addresses); if (future != null) { // Might be already cancelled by another members exception fixAsyncStackTrace(throwable, Thread.currentThread().getStackTrace(), "Operation failed on node: " + remoteAddress); future.setResult(throwable); } }
fixAsyncStackTrace((Throwable) value, Thread.currentThread().getStackTrace()); return throwable;
fixAsyncStackTrace((Throwable) value, Thread.currentThread().getStackTrace()); return throwable;