private static byte[] inflate(long sz, PackChunk pc, int pos, DhtReader reader) throws DataFormatException, DhtException { if (pc.isFragment()) return inflateFragment(sz, pc, pos, reader); return pc.inflateOne(sz, pos, reader); }
private static byte[] inflate(long sz, PackChunk pc, int pos, DhtReader reader) throws DataFormatException, DhtException { if (pc.isFragment()) return inflateFragment(sz, pc, pos, reader); return pc.inflateOne(sz, pos, reader); }
if (isFragment()) { int cnt = meta.getFragmentCount(); for (int fragId = 1; fragId < cnt; fragId++) {
public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, boolean validate) throws IOException, StoredObjectRepresentationNotAvailableException { DhtObjectToPack obj = (DhtObjectToPack) otp; try { PackChunk chunk = recentChunks.get(obj.chunk); if (chunk == null) { chunk = prefetcher.get(obj.chunk); if (chunk == null) { // This should never happen during packing, it implies // the fetch plan was incorrect. Unfortunately that can // occur if objects need to be recompressed on the fly. // stats.access(obj.chunk).cntCopyObjectAsIs_PrefetchMiss++; chunk = getChunk(obj.chunk); } if (!chunk.isFragment()) recentChunk(chunk); } chunk.copyObjectAsIs(out, obj, validate, this); } catch (DhtMissingChunkException missingChunk) { stats.access(missingChunk.getChunkKey()).cntCopyObjectAsIs_InvalidChunk++; throw new StoredObjectRepresentationNotAvailableException(otp); } }
if (isFragment()) { int cnt = meta.getFragmentCount(); for (int fragId = 1; fragId < cnt; fragId++) {
public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, boolean validate) throws IOException, StoredObjectRepresentationNotAvailableException { DhtObjectToPack obj = (DhtObjectToPack) otp; try { PackChunk chunk = recentChunks.get(obj.chunk); if (chunk == null) { chunk = prefetcher.get(obj.chunk); if (chunk == null) { // This should never happen during packing, it implies // the fetch plan was incorrect. Unfortunately that can // occur if objects need to be recompressed on the fly. // stats.access(obj.chunk).cntCopyObjectAsIs_PrefetchMiss++; chunk = getChunk(obj.chunk); } if (!chunk.isFragment()) recentChunk(chunk); } chunk.copyObjectAsIs(out, obj, validate, this); } catch (DhtMissingChunkException missingChunk) { stats.access(missingChunk.getChunkKey()).cntCopyObjectAsIs_InvalidChunk++; throw new StoredObjectRepresentationNotAvailableException(otp); } }
if (sz < Integer.MAX_VALUE && !pc.isFragment()) { try { data = pc.inflateOne(sz, pos + p, ctx);
if (sz < Integer.MAX_VALUE && !pc.isFragment()) { try { data = pc.inflateOne(sz, pos + p, ctx);