public USKAttempt(Lookup l, boolean forever) { this.lookup = l; this.number = l.val; this.succeeded = false; this.dnf = false; this.forever = forever; this.checker = new USKChecker(this, l.key, forever ? -1 : ctx.maxUSKRetries, l.ignoreStore ? ctxNoStore : ctx, parent, realTimeFlag); } @Override
public void reloadPollParameters(ClientContext context) { USKChecker c; synchronized(this) { c = checker; } if(c == null) return; c.onChangedFetchContext(context); } }
public void schedule(ClientContext context) { USKChecker c; synchronized(this) { c = checker; } if(c == null) { if(logMINOR) Logger.minor(this, "Checker == null in schedule() for "+this, new Exception("debug")); } else { assert(!c.persistent()); c.schedule(context); } }
if(canRetry && retry(context)) return; unregisterAll(context); if(e.code == LowLevelGetException.CANCELLED){ cb.onCancelled(context);
@Override protected void onBlockDecodeError(SendableRequestItem token, ClientContext context) { onFailure(new LowLevelGetException(LowLevelGetException.DECODE_FAILED), token, context); }
public void cancel(ClientContext context) { cancelled = true; USKChecker c; synchronized(this) { c = checker; } if(c != null) c.cancel(context); onCancelled(context); }
@Override protected void notFoundInStore(ClientContext context) { // Ran out of retries. unregisterAll(context); // Rest are non-fatal. If have DNFs, DNF, else network error. cb.onDNF(context); }