private ClientRequestScheduler getScheduler(KeyBlock block, ClientContext context) { if(block instanceof CHKBlock) return context.getChkInsertScheduler(realTimeFlag); else if(block instanceof SSKBlock) return context.getSskInsertScheduler(realTimeFlag); else throw new IllegalArgumentException("Unknown block type "+block.getClass()+" : "+block); }
@Override public ClientRequestScheduler getScheduler(ClientContext context) { if(isSSK()) return context.getSskInsertScheduler(realTimeFlag); else return context.getChkInsertScheduler(realTimeFlag); }
public void schedule(ClientContext context) { if(getParentGrabArray() != null) return; // If change priority will unregister first. context.getChkInsertScheduler(parent.realTime).registerInsert(this, persistent); }
/** 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.getChkInsertScheduler(realTime).fetchingKeys(), topDontCompress, topRequiredBlocks, topTotalBlocks, origDataSize, origCompressedDataSize); int mustSucceed = storage.topRequiredBlocks - topRequiredBlocks;
this.storage = new SplitFileInserterStorage(raf, originalData, this, context.fastWeakRandom, context.memoryLimitedJobRunner, context.getJobRunner(true), context.ticker, context.getChkInsertScheduler(realTime).fetchingKeys(), context.persistentFG, context.persistentFileTracker, context.getPersistentMasterSecret()); storage.onResume(context);