@Override public boolean completeExceptionally(Throwable exception) { return super.completeExceptionally((exception instanceof SuspectedException) ? new CancellationException() : exception); }
public void transportClosed() { if(isDone()) return; completeExceptionally(new IllegalStateException("transport was closed")); corrDone(); }
public void siteUnreachable(String site) { if(!(target instanceof SiteAddress) || !((SiteAddress)target).getSite().equals(site) || isDone()) return; completeExceptionally(new UnreachableException(target)); corrDone(); }
/** * <b>Callback</b> (called by RequestCorrelator or Transport). * Adds a response to the response table. When all responses have been received, {@code execute()} returns. */ public void receiveResponse(Object response_value, Address sender, boolean is_exception) { if(isDone()) return; if(is_exception && response_value instanceof Throwable) completeExceptionally((Throwable)response_value); else complete((T)response_value); corrDone(); }
/** * If the target address is not a member of the new view, we'll mark the response as suspected and unblock * the caller of execute() */ public void viewChange(View view) { if(view == null) return; // SiteAddresses are not checked as they might be in a different cluster if(!(target instanceof SiteAddress) && !view.containsMember(target) && !isDone()) { completeExceptionally(new SuspectedException(target)); corrDone(); } }
@Override public boolean completeExceptionally(Throwable exception) { return super.completeExceptionally((exception instanceof SuspectedException) ? new CancellationException() : exception); }
public void transportClosed() { if(isDone()) return; completeExceptionally(new IllegalStateException("transport was closed")); corrDone(); }
public void siteUnreachable(String site) { if(!(target instanceof SiteAddress) || !((SiteAddress)target).getSite().equals(site) || isDone()) return; completeExceptionally(new UnreachableException(target)); corrDone(); }
/** * <b>Callback</b> (called by RequestCorrelator or Transport). * Adds a response to the response table. When all responses have been received, {@code execute()} returns. */ public void receiveResponse(Object response_value, Address sender, boolean is_exception) { if(isDone()) return; if(is_exception && response_value instanceof Throwable) completeExceptionally((Throwable)response_value); else complete((T)response_value); corrDone(); }
/** * If the target address is not a member of the new view, we'll mark the response as suspected and unblock * the caller of execute() */ public void viewChange(View view) { if(view == null) return; // SiteAddresses are not checked as they might be in a different cluster if(!(target instanceof SiteAddress) && !view.containsMember(target) && !isDone()) { completeExceptionally(new SuspectedException(target)); corrDone(); } }