@Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException { for (ObjectInfo info : find(objectId)) return info.getSize(); throw missing(objectId, typeHint); }
@Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException { for (ObjectInfo info : find(objectId)) return info.getSize(); throw missing(objectId, typeHint); }
@Override public boolean has(AnyObjectId objId, int typeHint) throws IOException { if (objId instanceof RefDataUtil.IdWithChunk) return true; if (recentChunks.has(repo, objId)) return true; if (repository.getRefDatabase().findChunk(objId) != null) return true; return !find(objId).isEmpty(); }
@Override public boolean has(AnyObjectId objId, int typeHint) throws IOException { if (objId instanceof RefDataUtil.IdWithChunk) return true; if (recentChunks.has(repo, objId)) return true; if (repository.getRefDatabase().findChunk(objId) != null) return true; return !find(objId).isEmpty(); }
ChunkKey findChunk(AnyObjectId objId) throws DhtException { if (objId instanceof RefDataUtil.IdWithChunk) return ((RefDataUtil.IdWithChunk) objId).getChunkKey(); ChunkKey key = repository.getRefDatabase().findChunk(objId); if (key != null) return key; ChunkAndOffset r = recentChunks.find(repo, objId); if (r != null) return r.chunk.getChunkKey(); for (ObjectInfo link : find(objId)) return link.getChunkKey(); return null; }
ChunkKey findChunk(AnyObjectId objId) throws DhtException { if (objId instanceof RefDataUtil.IdWithChunk) return ((RefDataUtil.IdWithChunk) objId).getChunkKey(); ChunkKey key = repository.getRefDatabase().findChunk(objId); if (key != null) return key; ChunkAndOffset r = recentChunks.find(repo, objId); if (r != null) return r.chunk.getChunkKey(); for (ObjectInfo link : find(objId)) return link.getChunkKey(); return null; }
for (ObjectInfo link : find(objId)) { PackChunk chunk;
for (ObjectInfo link : find(objId)) { PackChunk chunk;