ObjectWithInfo(T object, ObjectInfo info, ObjectWithInfo<T> next) { this.object = object; this.info = info; this.chunkKey = info.getChunkKey(); this.next = next; }
ObjectWithInfo(T object, ObjectInfo info, ObjectWithInfo<T> next) { this.object = object; this.info = info; this.chunkKey = info.getChunkKey(); this.next = next; }
ChunkKey getChunkKey() { return info.getChunkKey(); }
ChunkKey getChunkKey() { return info.getChunkKey(); }
private static ChunkKey chunk(Collection<ObjectInfo> info) { if (info == null || info.isEmpty()) return null; List<ObjectInfo> infoList = new ArrayList<ObjectInfo>(info); ObjectInfo.sort(infoList); return infoList.get(0).getChunkKey(); }
private static ChunkKey chunk(Collection<ObjectInfo> info) { if (info == null || info.isEmpty()) return null; List<ObjectInfo> infoList = new ArrayList<ObjectInfo>(info); ObjectInfo.sort(infoList); return infoList.get(0).getChunkKey(); }
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; }
public void add(ObjectIndexKey objId, ObjectInfo info, WriteBuffer buffer) throws DhtException { ChunkKey chunk = info.getChunkKey(); table.put(objId.asBytes(), colInfo.append(chunk.asBytes()), info.getData().toByteArray()); }
public void add(ObjectIndexKey objId, ObjectInfo info, WriteBuffer buffer) throws DhtException { ChunkKey chunk = info.getChunkKey(); table.put(objId.asBytes(), colInfo.append(chunk.asBytes()), info.getData().toByteArray()); }
chunk = prefetcher.get(link.getChunkKey()); if (chunk == null) { chunk = load(link.getChunkKey()); if (chunk == null) continue; chunk = load(link.getChunkKey()); if (chunk == null) continue;
chunk = prefetcher.get(link.getChunkKey()); if (chunk == null) { chunk = load(link.getChunkKey()); if (chunk == null) continue; chunk = load(link.getChunkKey()); if (chunk == null) continue;
private byte[] encode(List<ObjectInfo> items) { CachedObjectIndex.Builder b; b = CachedObjectIndex.newBuilder(); for (ObjectInfo info : items) { CachedObjectIndex.Item.Builder i = b.addItemBuilder(); i.setChunkKey(info.getChunkKey().asString()); i.setObjectInfo(info.getData()); if (0 < info.getTime()) i.setTime(info.getTime()); } return b.build().toByteArray(); } });
private byte[] encode(List<ObjectInfo> items) { CachedObjectIndex.Builder b; b = CachedObjectIndex.newBuilder(); for (ObjectInfo info : items) { CachedObjectIndex.Item.Builder i = b.addItemBuilder(); i.setChunkKey(info.getChunkKey().asString()); i.setObjectInfo(info.getData()); if (0 < info.getTime()) i.setTime(info.getTime()); } return b.build().toByteArray(); } });