@Override public synchronized long getWakeupTime(ClientContext context, long now) { if(isEmpty()) return -1; if(scheduler.fetchingKeys().hasInsert(new MySendableRequestItem(this))) return Long.MAX_VALUE; return 0; }
@Override public synchronized long getWakeupTime(ClientContext context, long now) { if(cancelled || finished) return -1; long wakeTime = cooldownWakeupTime; if(wakeTime <= now) cooldownWakeupTime = wakeTime = 0; KeysFetchingLocally fetching = getScheduler(context).fetchingKeys(); if(wakeTime <= 0 && fetching.hasKey(getNodeKey(null), this)) { wakeTime = Long.MAX_VALUE; // tracker.cooldownWakeupTime is only set for a real cooldown period, NOT when we go into hierarchical cooldown because the request is already running. } if(wakeTime == 0) return 0; return wakeTime; }
@Override public long getWakeupTime(ClientContext context, long now) { KeysFetchingLocally keysFetching = getScheduler(context).fetchingKeys(); synchronized(this) { if(finished) return -1; BlockItemKey key = new BlockItemKey(this, hashCode()); if(keysFetching.hasInsert(key)) return Long.MAX_VALUE; return 0; } }
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);
context.getChkInsertScheduler(realTime).fetchingKeys(), topDontCompress, topRequiredBlocks, topTotalBlocks, origDataSize, origCompressedDataSize); int mustSucceed = storage.topRequiredBlocks - topRequiredBlocks;
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,
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);