if (updateState(pending, new FailedState(cause))) if (DEBUG) LOG.debug("failed: " + this, cause); if (updateState(current, new FailedState(cause))) return true; break;
if (updateState(pending, new FailedState(cause))) if (DEBUG) LOG.debug("failed: " + this, cause); if (updateState(current, new FailedState(cause))) return true; break;
public void onFail(Throwable cause) { if (DEBUG) LOG.debug("failed: {} {}", this, cause); // Keep trying to handle the failure until we get to IDLE or FAILED state while(true) { State current=_state.get(); switch(current.getType()) { case IDLE: case FAILED: return; case PENDING: PendingState pending = (PendingState)current; if (updateState(pending,__IDLE)) { pending.fail(cause); return; } break; default: if (updateState(current,new FailedState(cause))) return; break; } } }
if (updateState(__WRITING, new FailedState(e))) callback.failed(e); else
if (updateState(__COMPLETING, new FailedState(e))) callback.failed(e); else
if (updateState(__WRITING, new FailedState(e))) callback.failed(e); else
if (updateState(__COMPLETING, new FailedState(e))) callback.failed(e); else
LOG.debug("failed: {} {}", this, cause); if (updateState(current,new FailedState(cause))) return false; break;
public void onFail(Throwable cause) { if (DEBUG) LOG.debug("failed: {} {}", this, cause); // Keep trying to handle the failure until we get to IDLE or FAILED state while(true) { State current=_state.get(); switch(current.getType()) { case IDLE: case FAILED: return; case PENDING: PendingState pending = (PendingState)current; if (updateState(pending,__IDLE)) { pending.fail(cause); return; } break; default: if (updateState(current,new FailedState(cause))) return; break; } } }
LOG.debug("failed: {} {}", this, cause); if (updateState(current,new FailedState(cause))) return false; break;