@Override public ClientRequestScheduler getScheduler(ClientContext context) { if(isSSK) return context.getSskFetchScheduler(realTimeFlag); else return context.getChkFetchScheduler(realTimeFlag); }
/** * Schedule the fetch. * @param context * @param ignoreStore If true, don't check the datastore before re-registering the requests to * run. Should be true when rescheduling after a normal cooldown, false after recovering from * data corruption (the blocks may still be in the store), false otherwise. */ public void schedule(ClientContext context, boolean ignoreStore) { ClientRequestScheduler sched = context.getChkFetchScheduler(realTimeFlag); BlockSet blocks = parent.blockFetchContext.blocks; sched.register(this, new SendableGet[] { this }, persistent, blocks, ignoreStore); }
@Override public KeySalter getSalter() { return context.getChkFetchScheduler(realTimeFlag).getGlobalKeySalter(persistent); }
@Override public ClientRequestScheduler getScheduler(ClientContext context) { if(isSSK()) return context.getSskFetchScheduler(realTimeFlag); else return context.getChkFetchScheduler(realTimeFlag); }
public void fail(FetchException e) { synchronized(this) { if(succeeded || failed) return; failed = true; } if(storage != null) context.getChkFetchScheduler(realTimeFlag).removePendingKeys(storage.keyListener, true); if(getter != null) getter.cancel(context); if(storage != null) storage.cancel(); cb.onFailure(e, this, context); }
return; context.getChkFetchScheduler(realTimeFlag).removePendingKeys(storage.keyListener, true); getter.cancel(context); if(this.callbackCompleteViaTruncation != null) {
/** Change the priority class of the request (request includes inserts here). * @param newPriorityClass The new priority class for the request or insert. * @param ctx The ClientContext, contains essential transient objects such as the schedulers. */ public void setPriorityClass(short newPriorityClass, ClientContext ctx) { short oldPrio; synchronized(this) { oldPrio = priorityClass; this.priorityClass = newPriorityClass; } if(logMINOR) Logger.minor(this, "Changing priority class of "+this+" from "+oldPrio+" to "+newPriorityClass); ctx.getChkFetchScheduler(realTimeFlag).reregisterAll(this, oldPrio); ctx.getChkInsertScheduler(realTimeFlag).reregisterAll(this, oldPrio); ctx.getSskFetchScheduler(realTimeFlag).reregisterAll(this, oldPrio); ctx.getSskInsertScheduler(realTimeFlag).reregisterAll(this, oldPrio); }
context.ticker, context.memoryLimitedJobRunner, checker, persistent, fileCompleteViaTruncation, context.getFileRandomAccessBufferFactory(persistent), context.getChkFetchScheduler(realTimeFlag).fetchingKeys()); } catch (InsufficientDiskSpaceException e) { throw new FetchException(FetchExceptionMode.NOT_ENOUGH_DISK_SPACE);
this.storage = new SplitFileFetcherStorage(raf, realTimeFlag, this, blockFetchContext, context.random, context.jobRunner, context.getChkFetchScheduler(realTimeFlag).fetchingKeys(), context.ticker, context.memoryLimitedJobRunner, new CRCChecksumChecker(), context.jobRunner.newSalt(), salter, resumed,