LargeNonDeltaObject(int type, long sz, PackChunk pc, int pos, DhtReader ctx) { this.type = type; this.sz = sz; this.pos = pos; this.ctx = ctx; this.meta = pc.getMeta(); firstChunk = pc; }
LargeNonDeltaObject(int type, long sz, PackChunk pc, int pos, DhtReader ctx) { this.type = type; this.sz = sz; this.pos = pos; this.ctx = ctx; this.meta = pc.getMeta(); firstChunk = pc; }
private PackChunk useReadyChunk(ChunkKey key) { PackChunk chunk = ready.remove(key); status.put(chunk.getChunkKey(), Status.DONE); bytesReady -= chunk.getTotalSize(); if (automaticallyPushHints) { push(chunk.getMeta()); maybeStartGet(); } return chunk; }
private PackChunk useReadyChunk(ChunkKey key) { PackChunk chunk = ready.remove(key); status.put(chunk.getChunkKey(), Status.DONE); bytesReady -= chunk.getTotalSize(); if (automaticallyPushHints) { push(chunk.getMeta()); maybeStartGet(); } return chunk; }
void push(DhtReader ctx, Collection<RevCommit> roots) { // Approximate walk by using hints from the most recent commit. // Since the commits were recently parsed by the reader, we can // ask the reader for their chunk locations and most likely get // cache hits. int time = -1; PackChunk chunk = null; for (RevCommit cmit : roots) { if (time < cmit.getCommitTime()) { ChunkAndOffset p = ctx.getChunkGently(cmit); if (p != null && p.chunk.getMeta() != null) { time = cmit.getCommitTime(); chunk = p.chunk; } } } if (chunk != null) { synchronized (this) { status.put(chunk.getChunkKey(), Status.DONE); push(chunk.getMeta()); } } }
void push(DhtReader ctx, Collection<RevCommit> roots) { // Approximate walk by using hints from the most recent commit. // Since the commits were recently parsed by the reader, we can // ask the reader for their chunk locations and most likely get // cache hits. int time = -1; PackChunk chunk = null; for (RevCommit cmit : roots) { if (time < cmit.getCommitTime()) { ChunkAndOffset p = ctx.getChunkGently(cmit); if (p != null && p.chunk.getMeta() != null) { time = cmit.getCommitTime(); chunk = p.chunk; } } } if (chunk != null) { synchronized (this) { status.put(chunk.getChunkKey(), Status.DONE); push(chunk.getMeta()); } } }
ChunkMeta meta = chunk.getMeta(); if (meta != null && meta.getBaseChunkCount() != 0) { for (ChunkMeta.BaseChunk base : meta.getBaseChunkList()) {
ChunkMeta meta = chunk.getMeta(); if (meta != null && meta.getBaseChunkCount() != 0) { for (ChunkMeta.BaseChunk base : meta.getBaseChunkList()) {
continue; if (prefetcher.isType(typeHint)) prefetcher.push(chunk.getMeta());
continue; if (prefetcher.isType(typeHint)) prefetcher.push(chunk.getMeta());